summaryrefslogtreecommitdiff
path: root/transactions.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'transactions.lisp')
-rw-r--r--transactions.lisp13
1 files changed, 13 insertions, 0 deletions
diff --git a/transactions.lisp b/transactions.lisp
new file mode 100644
index 0000000..6a50fc1
--- /dev/null
+++ b/transactions.lisp
@@ -0,0 +1,13 @@
+;;;; transactions.lisp -- data store transactions for dnd
+
+(in-package :dnd)
+
+(defun birth-from-the-goddess-loins (name)
+ (db:with-transaction ()
+ (make-instance 'hero :name name)))
+
+(defun new-sesh (hero)
+ (db:with-transaction () (make-instance 'session :hero hero)))
+
+(defun destroy-sesh (session)
+ (db:delete-object session))