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.
XmlSource
An XML document as tables: each element named 'row_element' is a row. Its attributes are columns named '
Operations
FromText # function
Makes a source over XML text already in memory
function : FromText(name:String, text:String, row_element:String) ~ XmlSourceParameters
| Name | Type | Description |
|---|---|---|
| name | String | table name |
| text | String | XML text |
| row_element | String | name of the elements that are rows |
Return
| Type | Description |
|---|---|
| XmlSource | source |
GetChildTables #
Gets the child tables the last Read made, depth first in the order their elements were first seen
method : public : GetChildTables() ~ Vector<Table>Return
| Type | Description |
|---|---|
| Vector<Table> | child tables, empty if there are none |
GetError #
Gets the reason the last read failed
method : public : GetError() ~ StringReturn
| Type | Description |
|---|---|
| String | error, Nil if none |
GetTables #
Gets the tables the document provides, the main table first; they are known only after reading it
method : public : GetTables() ~ TableSpec[]Return
| Type | Description |
|---|---|
| TableSpec | table shapes |
Load #
Loads the document's tables into a catalog
method : public : Load(catalog:Catalog, hint:ScanHint) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| catalog | Catalog | catalog |
| hint | ScanHint | columns and rows of the main table needed, Nil for everything |
Return
| Type | Description |
|---|---|
| Bool | true if loaded |
New # constructor
Constructor; the table is named after the file
New(path:String, row_element:String)Parameters
| Name | Type | Description |
|---|---|---|
| path | String | XML file |
| row_element | String | name of the elements that are rows |
New # constructor
Constructor
New(path:String, name:String, row_element:String)Parameters
| Name | Type | Description |
|---|---|---|
| path | String | XML file |
| name | String | table name |
| row_element | String | name of the elements that are rows |