Thanks Alex,
The concatenation of multiple collects is just what I need :)
Regards,
Kashyap

On Tue, Nov 5, 2019 at 4:59 AM Alexander Burger <a...@software-lab.de> wrote:

> Hi Kashyap,
>
> > My ER model looks like this -
> > (class +Task +Entity)
> > (rel ttl (+IdxFold +String))
> > ...
> > (rel upds (+List +Joint) tsk (+Update))
> > ...
> > (class +Update +Entity)
> > (rel tsk (+Joint) upds (+Task) )
> > (rel dsc (+Sn +IdxFold +String))
> > ...
> > How can I select all the Tasks that have a given text that either matches
> > the title of the +Task (ttl) or the description of an +Update (dsc)?
>
> Normal usage of two 'select' generators will not do this, as they imply an
> AND.
> A combined generator is not usable, I think, due to the different
> structure.
>
> So you could use nested queries (see doc/select.html) if you need 'select'
> (e.g.
> because you want to make a more general search over other keys too), or
> simply
> traverse both trees one after the other (i.e. an OR).
>
> The latter one is the simplest:
>
>    (let Text (...)
>       (uniq
>          (conc
>             (collect 'ttl '+Task Text)
>             (collect 'dsc '+Update Text Text 'tsk) ) ) )
>
> (Not tested)
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to