Hi Thorsten,

> ,--------------
> | (class +a)
> | (rel a1)
> |
> | (class +b +a)
> | (rel b1)
> |
> | (class +C +b)
> | (rel C1)
> |
> | (class +D +a)
> | (rel D1)
> `--------------
> now
> ,---------------
> | (select a1 +C)
> `---------------
> and
> ,---------------
> | (select a1 +D)
> `---------------
> both show me all objects that somehow inherited attribute 'a1', although
> they only have the same root of the class hierarchy (+a), where the
> attribute is defined, but do not belong to the same branches of the
> hierarchy.

I do not know what the relations 'rel' are, i.e. which indexes they have
and, how these indexes are populated. But in general, note that

  (select a1 +C)

reads "SELECT a1 from C". This means, you specified no search criterion
at all.

'select' is a bit tricky, it tries to find out what you want to do. If
you want

   SELECT * from C where a1 = xxx

you would do

   (select +C a1 "abc")

This 'show's all objects completely, not just the 'a1' property.

If you don't give a relation (index) to search for, 'select' tries to
find a suitable index by itself by doing some heuristic guesses.

This is because the PicoLisp database doesn't enforce any attributes or
indexes, and it highly depends on the application how to find which

And you should keep in mind that 'select' is just a help for debugging.
It cannot be used in an application.

For precise searches, use the 'select' and 'db' Pilog queries, or the
'db' and 'collect' Lisp functions.

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

Reply via email to