GizStackGizStack
View .mdOpen in ChatGPTOpen in Claude

gizmodel/sql/parsecreate

The SQL parser: CREATE, partitions and COPY.

gizlang
import * as Parsecreate from "gizmodel/sql/parsecreate";

Methods

Parser.create

gizlang
function Parser.create(self: mut Parser): Statement

Effects: fail, read, alloc.

Parser.partitionBound

gizlang
function Parser.partitionBound(self: mut Parser): string

FOR VALUES IN (...) | FROM (...) TO (...) | WITH (MODULUS m, REMAINDER r), or DEFAULT (Statement.partitionBound).

Effects: fail, alloc.

Parser.source

gizlang
function Parser.source(self: Parser, from: i64, to: i64): string

The source between token from and the token at to (exclusive), trimmed.

Effects: fail, alloc.

Parser.copy

gizlang
function Parser.copy(self: mut Parser): Statement

COPY table [(columns)] FROM STDIN | COPY table | (query) TO STDOUT, with options in PostgreSQL's list form (FORMAT csv, HEADER, DELIMITER ',', NULL '', QUOTE, ESCAPE) or the older words (CSV HEADER, DELIMITER AS ','). what: from or to; text: the options as name=value lines; name: a server file, which is refused.

Effects: fail, read, alloc.