v2026.11.2
All Bundles
Bundle

In-memory query engine over typed columns. Tables are filled row by row or loaded from sources (CSV files, folders, the program's own objects) and queried with SQL-like statements; aggregates, Describe() and Finder (file search) are included. Compile with -lib query.

Predicate

A condition on a table's rows, built with Col and combined with AndAlso, OrElse and Negate. A condition names its columns, so the same one can be used on any table that has them. Comparisons are false for an empty cell; numbers compare by value whether Int or Float; a cell that cannot be ordered against the value (text and a number, say) satisfies only NE.

Example

p := Col->Of("score")->Gt(0.5)->AndAlso(Col->Of("label")->Eq("cat"));
rs := table->Where(p)->OrderBy("score", Order->DESC)->Limit(10);

Operations

AndAlso #

Both this condition and another

method : public : AndAlso(condition:Predicate) ~ Predicate

Parameters

NameTypeDescription
conditionPredicateother condition

Return

TypeDescription
Predicatecombined condition

GetColumn #

Gets the column a comparison names

method : public : GetColumn() ~ String

Return

TypeDescription
Stringcolumn name, Nil for AND, OR and NOT

GetLeft #

Gets the first condition of AND, OR or NOT

method : public : GetLeft() ~ Predicate

Return

TypeDescription
Predicatecondition

GetOp #

Gets the operation

method : public : GetOp() ~ Op

Return

TypeDescription
Opoperation

GetParam #

Gets the placeholder number a comparison takes its value from

method : public : GetParam() ~ Int

Return

TypeDescription
Intplaceholder number (1 based), 0 for none

GetRight #

Gets the second condition of AND or OR

method : public : GetRight() ~ Predicate

Return

TypeDescription
Predicatecondition

GetValue #

Gets the value a comparison uses

method : public : GetValue() ~ Compare

Return

TypeDescription
Comparevalue

Negate #

The rows this condition does not select, empty cells included

method : public : Negate() ~ Predicate

Return

TypeDescription
Predicatenegated condition

New # constructor

Constructor for a comparison. Col builds these.

New(op:Op, column:String, value:Compare, param:Int)

Parameters

NameTypeDescription
opOpcomparison
columnStringcolumn name
valueComparevalue compared against, Nil for IS_NULL and NOT_NULL
paramIntplaceholder number (1 based) whose bound value replaces 'value', 0 for none

New # constructor

Constructor for AND, OR and NOT; NOT takes 'right' as Nil

New(op:Op, left:Predicate, right:Predicate)

Parameters

NameTypeDescription
opOpAND, OR or NOT
leftPredicatefirst condition
rightPredicatesecond condition

OrElse #

Either this condition or another

method : public : OrElse(condition:Predicate) ~ Predicate

Parameters

NameTypeDescription
conditionPredicateother condition

Return

TypeDescription
Predicatecombined condition