-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-2.lisp
More file actions
39 lines (33 loc) · 1.06 KB
/
test-2.lisp
File metadata and controls
39 lines (33 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
(in-package :xdb2)
(defclass foo ()
((version :initarg :version
:initform 1
:accessor version)))
(defclass standard-test ()
((foo :initarg :foo
:initform (make-instance 'foo)
:accessor foo)
(slot :initarg :slot
:initform '("An" 1 #(0 -3) 1d0 #(1/4 foo) . #\s)
:accessor slot)))
(defclass storable-test ()
((slot :initarg :slot
:initform '("An" 1 #(0 -3) 1d0 #(1/4 'foo) . #\s)
:accessor slot)
(foo :initarg :foo
:initform nil
:accessor foo))
(:metaclass storable-class))
(defclass boo ()
((slot :initarg :slot
:initform '("An" 1 #(0 -3) 1d0 #(1/4 'foo) . #\s)
:accessor slot)
(foo :initarg :foo
:initform nil
:accessor foo))
(:metaclass storable-class))
(defparameter *test-db* (make-instance 'xdb :location "/tmp/db-test2/"))
(defparameter *test-col* (add-collection *test-db* "test" :load-from-file-p t))
(defun storable-test ()
(let ((a (make-instance 'storable-test)))
(store-doc *test-col* (make-instance 'boo :foo a))))