Skip to content

session/src

Class Description
Session One open store with a lifetime: a location, a run, manual transactions, a restart and a close.
SessionClosedError Thrown by the accessors that return data, when the session is closed. A run returns a refusal instead.
Interface Description
LocatedStatement A statement of a source, as locateStatements finds it.
SessionOptions How a session opens its store.
Type Alias Description
ControlResult What begin, commit and rollback answered.
Diagnostics The diagnostics of a run: its execution facts (ADR-004), and the diagnostic of a refusal.
RefusalReason Why a session refused. A caller branches on this, never on message text.
Row One answer row, every cell rendered as the engine’s own toString() of its concept or value.
RunResult What a statement answered. Returned, never thrown: a session that dies on a typo is unusable.
SessionMode auto: each statement is a transaction of its own, and commits when it succeeds. manual: a begin is open, statements join it, and nothing is permanent until commit.
StatementKind - empty: nothing but whitespace. - define: a schema block, run by the interpreter’s define. - read: a pipeline with no write stage, run by query. - write: anything else, run by execute.
Function Description
classifyStatement Classify one statement. It never throws and never touches a store.
locateStatements The statements splitStatements finds, where they are: each one’s text as written and its position, so a range the engine reports for a statement can be placed in the file it came from.
splitStatements Split a source into statements a session can run one at a time.

TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.