Hi Kashyap,

>  (collect 'tgs '+Item (db 'nm '+Tag "BLUE")) does not seem to work for me -

Sorry, my fault! I did not test.

> returns NIL. For that matter, even (collect 'tgs '+Item) returns NIL. I
> wonder if its because 'tgs does not have +Idx in the relation
> 
> (class +Item +Entity)
> (rel ttl (+IdxFold +String))
> (rel tgs (+List +Joint) itm (+Tag))
> (rel sts (+IdxFold +String))

Right, we cannot 'collect' using the 'tgs' relation, as it has no index.


> Also,  (mapcar '((This) (: itm)) (collect 'nm '+Tag "BLUE")) worked fine -
> now I see the beauty of "This" better. Btw, I had to get rid of "T" in 
> (collect
> 'nm '+Tag "BLUE" NIL T 'itm) to get it to work.

Ah, haha, sorry again :)

You can either

   (collect 'nm '+Tag NIL T 'itm)

i.e. collect *all* tags (from minus infinte to plus infinite), or

   (collect 'nm '+Tag "BLUE" "BLUE" 'itm)

to collect only the blue ones (from and till are "BLUE").

☺/ A!ex

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

Reply via email to