Hi List, 

assume I have a (hypothetical) database with objects of class +Thing
that have relations defined like this:

#+name: myBag
#+BEGIN_SRC picolisp
(rel stamp (+Bag)
   ((+Symbol))                          # timestamp-type
   ((+Ref +Date))                       # start date
   ((+Time)) )                          # start time
#+END_SRC

e.g.

,--------------------------
| stamp (active 735458 NIL)
`--------------------------

#+name: myListBag
#+BEGIN_SRC picolisp
(rel props (+List +Bag)
   ((+Ref +String))                     # Key
   ((+String)) )                        # Value
#+END_SRC

e.g.

,--------------------------------------------------------
| props (("key1" "val1") ("key2" "val2") ("key3" "val3"))
`--------------------------------------------------------

#+name: myStringList
#+BEGIN_SRC picolisp
(rel tags (+List +Ref +String))
#+END_SRC

e.g.

,----------------------------
| tags ("tag1" "tag2" "tag3")
`----------------------------


Now, how can I query the DB from a program, using these relations? E.g.

1. Find objects with an active (time)stamp with date 735458?
2. Find objects with props with key 'key1' and value 'val1' or 'val2'
   for this key?
3. Find objects with tags 'tag1' and 'tag3'?

Maybe I missed something, but querying non-atomic relation is not
really covered in the docs.

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to