Method: (DB-PGET DB-EXT T)

Source

(defmethod db-pget ((db db-ext) key &key pkey txn
		   consume consume-wait
		   set-recno
		   multiple rmw
		   not-found)
  (with-cbuffer key-buffer
    (funcall (buf-writer db) key key-buffer)
    (let ((pkey-buffer (when pkey (alloc-cbuffer))))
      (unwind-protect
	   (multiple-value-bind (pkey-buf data-buf)
	       (db-pget (if (is-secondary db)
			   (db-sec-handle db)
			   (db-handle db))
		       key-buffer
		       :pkey (when pkey
			       (funcall (buf-writer db)
					pkey
					pkey-buffer)
			       pkey-buffer)
		       :txn txn
		       :consume consume :consume-wait consume-wait
		       :set-recno set-recno
		       :multiple multiple :rmw rmw
		       :not-found not-found)
	     (let ((pkey-ret nil)
		   (data-ret nil))
	       (unwind-protect
		    (progn
		      (setf pkey-ret (funcall (buf-reader db) pkey-buf))
		      (setf data-ret (funcall (buf-reader db) data-buf)))
		 (free-cbuffer pkey-buf)
		 (free-cbuffer data-buf))
	       (values pkey-ret data-ret)))
	(when pkey-buffer
	  (free-cbuffer pkey-buffer))))))
Source Context