Browse Source

Added get marriage by id

Samuel W. Flint 10 years ago
parent
commit
9ed273f935
1 changed files with 7 additions and 0 deletions
  1. 7 0
      database.lisp

+ 7 - 0
database.lisp

@@ -151,6 +151,13 @@
              (where (and (equal :/wife wife)
                        (equal :/husband husband)))))))
 
+;; get marriage (by id)
+(defun get-marriage-id (marriage-id)
+  (with-tx
+    (first
+     (select :marriages
+             (where (and (equal :/marriage-id marriage-id)))))))
+
 ;;; get divorce (by marriage)
 (defun get-divorce (id)
   (with-tx