diff options
| author | ckonstanski <carlos.konstanski@olo.com> | 2021-05-30 21:57:13 -0600 |
|---|---|---|
| committer | ckonstanski <carlos.konstanski@olo.com> | 2021-05-30 21:57:13 -0600 |
| commit | c33aa8bd4e448c831362767de57a8f33bdadd09a (patch) | |
| tree | a9e10acfa93c70c0703011ab33a4a87e6b712824 /src/session-object.lisp | |
initial commit
Diffstat (limited to 'src/session-object.lisp')
| -rw-r--r-- | src/session-object.lisp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/session-object.lisp b/src/session-object.lisp new file mode 100644 index 0000000..480cf6f --- /dev/null +++ b/src/session-object.lisp @@ -0,0 +1,18 @@ +;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +(declaim (optimize (speed 0) (safety 3) (debug 3))) + +(in-package :org-ckons-session) + +(defclass session-object () + ((*session-key :initarg :*session-key + :initform (error 'org-ckons-condition::handled-error :text "Subclasses of `session-object' must supply an initform for the *SESSION-KEY slot.") + :accessor *session-key + :documentation "The key to the user_session_objects table.")) + (:documentation "Superclass for all session objects. +`session-object' is involved in multiple inheritance. Every +`session-object' is also a `record'. It must have a `*where-expresion' +of id = ~a.")) + +(defmethod sanitize-json ((session-object session-object)) + (setf (*session-key session-object) nil) + (call-next-method)) |
