Treeql Low Level API

Treeql is a fairly thin query facility over Trees. It implements an ordered set of nodes which are generated and filtered by application of the treeql query language to each node in turn.

Tree Transformers
These are low level functional transformers which apply operations to the underlying tree via the node set, and generate a new node set.
query apply cmd args returns the list of results of application apply [tree $node {*}cmd {*}args] form to each node in node set query sapply cmd args returns the concatenated strings of results of application apply [tree $node {*}cmd {*}args] form to each node in node set query applyself cmd args returns the list of results of the application apply [query {*}cmd node {*}args] to each node, discarding null results query mapself cmd returns the list of results of the application apply [query {*}cmd node {*}args] to each node in node set, keeping null results
Tree Filters
These are low level filters, which apply predicates to the underlying tree via the node set, and reduce the nodeset accordingly.
query filter cmd args returns the list of results of application when application is non nil filter nodes by [tree {*}cmd {*}args] query bool cmd args returns the list of results of application when application is true filter nodes by the predicate [tree {*}cmd {*}args] query stringP op attr returns the list of nodes for which predicate is true filter nodes by predicate [string {*}op] over attribute attr query stringNP op attr returns the list of nodes for which predicate is false filter nodes by negating the predicate [string {*}op] over attribute attr query exprP op attr returns the list of nodes for which predicate is true filter nodes by predicate [expr {*}op] over attribute attr query exprNP op attr returns the list of nodes for which predicate is false filter nodes by predicate ![expr {*}op] over attribute attr