blob: ad9c9e88ded21aacfc72b3f801f53a51389470a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
;;;; 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 :nickname nick)))
(defun create-campaign (player title)
(db:with-transaction ()
(make-instance 'campaign :title title :creator player)))
|