Exists (query directive)
From WandoraWiki
(Difference between revisions)
Line 6: | Line 6: | ||
Exists(Directive directive) | Exists(Directive directive) | ||
+ | |||
+ | == Notes == | ||
+ | |||
+ | Note that the condition directive in ''If'' evaluates to true if it returns a non empty set. Thus it is usually unnecessary to wrap it inside an ''Exists'' directive. | ||
+ | |||
+ | == Examples == | ||
+ | |||
+ | importPackage(org.wandora.query2); | ||
+ | new Instances() | ||
+ | .where(new Exists(new Instances())) | ||
+ | |||
+ | This selects all instances of the input topic which have instances of their own. | ||
[[Category:Query directives]] | [[Category:Query directives]] |
Latest revision as of 11:44, 21 August 2009
Contents |
[edit] Description
Includes rows where the inner directive returns a non-empty result using the row itself as input.
[edit] Constructor
Exists(Directive directive)
[edit] Notes
Note that the condition directive in If evaluates to true if it returns a non empty set. Thus it is usually unnecessary to wrap it inside an Exists directive.
[edit] Examples
importPackage(org.wandora.query2); new Instances() .where(new Exists(new Instances()))
This selects all instances of the input topic which have instances of their own.