source: branches/new-datamodel/playground/versioned-pointer.lisp

Last change on this file was 199, checked in by lgiessmann, 14 years ago

new-datamodel: added some example code files that analyses certain situations and elephant's behviour

File size: 777 bytes
Line 
1(asdf:operate 'asdf:load-op 'elephant)
2(elephant:open-store '(:BDB "data_base"))
3(defpclass Relation()
4           ((to-a :associate NodeA
5                  :accessor to-a
6                  :initarg :to-a)
7            (to-b :associate NodeB
8                  :accessor to-b
9                  :initarg :to-b)
10            (version :initarg :version
11                     :accessor version
12                     :type integer
13                     :index t))
14           (:index t))
15(defpclass NodeA()
16           ((relation-to-b :associate (Relation to-a)
17                           :accessor relation-to-b
18                           :initarg :relation-to-b))
19           (:index t))
20(defpclass NodeB()
21           ((relation-to-a :associate (Relation to-b)
22                           :accessor relation-to-a
23                           :initarg :relation-to-a))
24           (:index t))
25(defvar *rel* (make-instance 'Relation
26                                      :to-a (make-instance 'NodeA)
27                                      :to-b (make-instance 'NodeB)
28                                      :version 1))
Note: See TracBrowser for help on using the repository browser.