Source
(defmethod db-cursor-get ((cursor ext-cursor) &key key data
;;flags
current first get-both get-both-range
get-recno join-item last
next next-dup next-no-dup
prev prev-no-dup set set-range set-recno
multiple multiple-key rmw not-found)
(let ((key-buffer (when key (alloc-cbuffer)))
(data-buffer (when data (alloc-cbuffer))))
(unwind-protect
(multiple-value-bind (ret-key ret-data)
(call-next-method cursor
:key (when key
(funcall (buf-writer cursor)
key key-buffer)
key-buffer)
:data (when data
(funcall (buf-writer cursor)
data data-buffer)
data-buffer)
:current current :first first
:get-both get-both
:get-both-range get-both-range
:get-recno get-recno :join-item join-item
:last last :next next :next-dup next-dup
:next-no-dup next-no-dup :prev prev
:prev-no-dup prev-no-dup :set set
:set-range set-range :set-recno set-recno
:multiple multiple
:multiple-key multiple-key
:rmw rmw :not-found not-found)
(unwind-protect
(values (funcall (buf-reader cursor) ret-key)
(funcall (buf-reader cursor) ret-data))
(progn
(free-cbuffer ret-key)
(free-cbuffer ret-data))))
(progn
(when data-buffer (free-cbuffer data-buffer))
(when key-buffer (free-cbuffer key-buffer))))))
Source Context