blob: 35e817cb9922e67198fef4e16d50e73526e3e2c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
;;;; transactions.lisp -- data store transactions for dnd
(in-package :dnd)
(defun birth-from-the-goddess-loins (player name)
(db:with-transaction ()
(make-instance 'hero :name name :player player)))
(defun new-sesh (player)
(db:with-transaction () (make-instance 'session :player player)))
(defun destroy-sesh (session)
(db:with-transaction ()
(db:delete-object session)))
(defun register-player (nick)
(db:with-transaction ()
(make-instance 'player :nick nick)))
|