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.

HttpJsonSource

A JSON web service as tables: the array of objects at 'records_path' in each response becomes rows, mapped as JsonSource maps them (nested arrays become child tables). Paging follows a next-page link found in each response, or adds an offset to the URL, until a page is short, the link is missing or repeats, or the row limit is reached. Responses go through the same download cache as files named in SQL, so an unchanged page is not downloaded again.

Implements: Source

Example

source := HttpJsonSource->New("https://api.example.org/runs", "runs", "data.items");
source->SetNextLink("links.next");
runs := source->Read();

Operations

GetChildTables #

Gets the child tables the last Read made

method : public : GetChildTables() ~ Vector<Table>

Return

TypeDescription
Vector<Table>child tables, empty if there are none

GetError #

Gets the reason the last read failed

method : public : GetError() ~ String

Return

TypeDescription
Stringerror, Nil if none

GetPageCount #

Gets how many pages the last Read fetched

method : public : GetPageCount() ~ Int

Return

TypeDescription
Intpages

GetTables #

Gets the tables the service provides, the main table first; they are known only after reading it

method : public : GetTables() ~ TableSpec[]

Return

TypeDescription
TableSpectable shapes

Load #

Loads the service's tables into a catalog

method : public : Load(catalog:Catalog, hint:ScanHint) ~ Bool

Parameters

NameTypeDescription
catalogCatalogcatalog
hintScanHintcolumns and rows of the main table needed, Nil for everything

Return

TypeDescription
Booltrue if loaded

New # constructor

Constructor

New(url:String, name:String, records_path:String)

Parameters

NameTypeDescription
urlStringfirst page's URL
nameStringtable name
records_pathStringdotted path to the array of records in a response ('data.items'); an empty path means the response itself is the array

Read #

Reads every page into the main table; GetChildTables then has the others

method : public : Read() ~ Table

Return

TypeDescription
Tabletable, Nil on error (see GetError)

Read #

Reads every page into the main table; GetChildTables then has the others

method : public : Read(hint:ScanHint) ~ Table

Parameters

NameTypeDescription
hintScanHintcolumns and rows of the main table needed, Nil for everything

Return

TypeDescription
Tabletable, Nil on error (see GetError)

SetLimit #

Stops after this many rows

method : public : SetLimit(rows:Int) ~ Nil

Parameters

NameTypeDescription
rowsIntrow limit, -1 for none

SetNextLink #

Follows a next-page URL found at a dotted path in each response; a missing or null value ends paging

method : public : SetNextLink(path:String) ~ Nil

Parameters

NameTypeDescription
pathStringdotted path to the next page's URL

SetOffsetPaging #

Pages by adding an offset parameter to the URL (offset 0 first); a page with fewer than 'page_size' records is the last

method : public : SetOffsetPaging(param:String, page_size:Int) ~ Nil

Parameters

NameTypeDescription
paramStringquery parameter name, such as 'offset'
page_sizeIntrecords per page