Commit eb637714 authored by ryszard.szopa's avatar ryszard.szopa
Browse files

get-dao

darcs-hash:4664e7e3dae92abeba34b2465aaa195e53f6fa4f
parent d1441226
......@@ -101,8 +101,10 @@ holds."
(defgeneric delete-dao (dao)
(:documentation "Delete the given dao from the database."))
;(defun get-dao (type id)
; (select object type &optional test)
(defun get-dao (type id)
"Get the dao corresponding to the given primary key,
or return nil if it does not exist."
(let ((dao (make-instance type :id id)))
(when (dao-exists-p dao)
dao)))
......@@ -11,5 +11,5 @@
#:class-name-of #:class-non-transient-slots #:slot-value-or-id-if-foreign
#:with-connection #:with-object-connection #:with-class-connection
#:dao #:save-dao #:dao-exists-p #:insert-dao #:update-dao #:select-dao))
#:dao #:save-dao #:dao-exists-p #:insert-dao #:update-dao #:select-dao #:get-dao))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment