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.

OtabFile

An .otab file, or an .otab image in memory, opened for reading. Opening reads only the footer; Read then takes just the columns asked for, each checked against its CRC32, and GetBytesRead tells how much a read touched.

Example

file := OtabFile->New("runs.otab");
if(file->IsOpen()) {
  scores := file->Read(["id", "score"]);
};

Operations

GetBytesRead #

Gets how many bytes reads have taken so far, the header, trailer and footer included

method : public : GetBytesRead() ~ Int

Return

TypeDescription
Intbytes read

GetColumnNames #

Gets the saved column names, without the key column

method : public : GetColumnNames() ~ String[]

Return

TypeDescription
Stringnames

GetError #

Gets why opening or the last read failed

method : public : GetError() ~ String

Return

TypeDescription
Stringerror, Nil if none

GetFormatVersion #

Gets the file's format version: 1, or 2 for a file that stores index definitions

method : public : GetFormatVersion() ~ Int

Return

TypeDescription
Intversion, 0 if the file did not open

GetGroupCount #

Gets the number of row groups

method : public : GetGroupCount() ~ Int

Return

TypeDescription
Introw groups

GetIndexNames #

Gets the names of the indexes the file defines, which Read restores on the columns it reads

method : public : GetIndexNames() ~ String[]

Return

TypeDescription
Stringindex names, in column order

GetName #

Gets the table's name as saved

method : public : GetName() ~ String

Return

TypeDescription
Stringname

GetRequests #

Gets the number of HTTP requests made for a file read by URL

method : public : GetRequests() ~ Int

Return

TypeDescription
Intrequests, 0 for a local file or image

IsOpen #

Whether the file opened; GetError says why not

method : public : IsOpen() ~ Bool

Return

TypeDescription
Booltrue if open

New # constructor

Opens a file, reading only its trailer and footer. A path that starts with http:// or https:// is read over HTTP: with range requests when the server supports them, so only the footer and the blocks a Read asks for cross the network, and otherwise by downloading the file once.

New(path:String)

Parameters

NameTypeDescription
pathString.otab file, or its URL

New # constructor

Opens an .otab image held in memory, as Table->ToBytes makes it

New(bytes:Byte[])

Parameters

NameTypeDescription
bytesByteimage

Read #

Reads every column

method : public : Read() ~ Table

Return

TypeDescription
Tabletable, Nil on error (see GetError)

Read #

Reads only the named columns, and the key column; no other block is read

method : public : Read(names:String[]) ~ Table

Parameters

NameTypeDescription
namesStringcolumn names

Return

TypeDescription
Tabletable, Nil on error (see GetError)

Size #

Gets the number of rows

method : public : Size() ~ Int

Return

TypeDescription
Introws