From 25c1854c8306d4550c0ced886cbd36cb43099129 Mon Sep 17 00:00:00 2001 From: Grant Shoshin Shangreaux Date: Sat, 21 Jan 2023 09:08:08 -0600 Subject: Add: initial draft of doorkeeper session management --- transactions.lisp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 transactions.lisp (limited to 'transactions.lisp') 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)) -- cgit v1.2.3