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.
Row
A cursor over one row of a table: reading or writing it reads or writes the table's columns.
Operations
False # function
Helper for setting 'false' column value
function : False() ~ IntRefReturn
| Type | Description |
|---|---|
| IntRef | 'false' value holder |
Get #
Gets value by name
method : public : Get(name:String) ~ CompareParameters
| Name | Type | Description |
|---|---|---|
| name | String | column name |
Return
| Type | Description |
|---|---|
| Compare | value |
Get #
Gets value by index
method : public : Get(index:Int) ~ CompareParameters
| Name | Type | Description |
|---|---|---|
| index | Int | column index |
Return
| Type | Description |
|---|---|
| Compare | value |
GetKey #
Gets the row's primary key
method : public : GetKey() ~ IntReturn
| Type | Description |
|---|---|
| Int | primary key |
New # constructor
Constructor. Use Table->Insert, Get or GetAll rather than this.
New(table:Table, row:Int)Parameters
| Name | Type | Description |
|---|---|---|
| table | Table | table |
| row | Int | row slot |
Next #
Gets the next live row in insertion order
method : public : Next() ~ RowReturn
| Type | Description |
|---|---|
| Row | next row, Nil at the end |
Next #
Deprecated: rows follow insertion order, which cannot be changed. Does nothing.
method : public : Next(next:Row) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| next | Row | ignored |
Prev #
Gets the previous live row in insertion order
method : public : Prev() ~ RowReturn
| Type | Description |
|---|---|
| Row | previous row, Nil at the start |
Prev #
Deprecated: rows follow insertion order, which cannot be changed. Does nothing.
method : public : Prev(prev:Row) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| prev | Row | ignored |
Set #
Sets value by name
method : public : Set(name:String, value:Compare) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| name | String | column name |
| value | Compare | value |
Return
| Type | Description |
|---|---|
| Bool | true if successful, false otherwise (an unknown column, or a declared column of another type) |
Set #
Sets value by index
method : public : Set(index:Int, value:Compare) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| index | Int | column index; 0, the primary key, cannot be set |
| value | Compare | value |
Return
| Type | Description |
|---|---|
| Bool | true if successful, false otherwise |
Size #
Gets the number of columns
method : public : Size() ~ IntReturn
| Type | Description |
|---|---|
| Int | number of columns |