Count (query directive)

From WandoraWiki
Revision as of 13:04, 21 August 2009 by Olli (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

Counts the number of rows returned by the inner directive using same input the Count directive got.

Constructor

Count(Directive directive)

Examples

Following example counts all instances of the input directive.

importPackage(org.wandora.query2);
new Count(new Instances())

Following example finds all topics in the topic map that have more than 5 instances.

importPackage(org.wandora.query2);
new Count(new Instances())
.as("#count")
.from(new AllTopics().as("#topic"))
.where("#count",">","\"5\"",true)
Personal tools