Count (query directive)

From WandoraWiki
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