gizmodel/sql/parseexpr
The SQL parser: expressions, calls, windows and grouping sets.
import * as Parseexpr from "gizmodel/sql/parseexpr";Methods
Parser.expression
function Parser.expression(self: mut Parser): ExprParses one expression.
Effects: fail, read, alloc.
Parser.bitOr
function Parser.bitOr(self: mut Parser): ExprEffects: fail, read, alloc.
Parser.additive
function Parser.additive(self: mut Parser): ExprEffects: fail, read, alloc.
Parser.returningItems
function Parser.returningItems(self: mut Parser): Vec<Item>RETURNING items. Oracle's INTO :bind list reaches here only when the client sent no binds (db/ora cuts it off before it parses a statement): ORA-01008.
Effects: fail, read, alloc.
Parser.unary
function Parser.unary(self: mut Parser): ExprEffects: fail, read, alloc.
Parser.brackets
function Parser.brackets(self: mut Parser): ExprThe subscripts [i], [i:j], [:j], [i:] that follow: an expression whose args are a lower and an upper bound for each (an element's twice, an open bound ±2^62) and whose name has "e" (an element) or "s" (a slice) for each.
Effects: fail, read, alloc.
Parser.primary
function Parser.primary(self: mut Parser): ExprA primary expression; it reports the position of its first token.
Effects: fail, read, alloc.
Parser.argument
function Parser.argument(self: mut Parser): ExprA call argument: name => x or name := x is the "named" node of x, which the routine's
parameter list places (proc.giz positional).
Effects: fail, read, alloc.
Parser.windowSpec
function Parser.windowSpec(self: mut Parser): WindowEffects: fail, read, alloc.
Parser.count
function Parser.count(self: mut Parser): stringA signed integer count, as its text (FETCH, MOVE).
Effects: fail, alloc.
Parser.storageOptions
function Parser.storageOptions(self: mut Parser): string(name [= value], ...): storage parameters as "name=value" lines ("name" alone without a value); a name may carry a namespace (toast.name).
Effects: fail, alloc.
Parser.relOptionsAction
function Parser.relOptionsAction(self: mut Parser, s: mut Statement): voidSET (options) or RESET (names) of ALTER TABLE or ALTER INDEX: actions set_options and reset_options.
Effects: fail, alloc.
Parser.skipAction
function Parser.skipAction(self: mut Parser): voidSkips the rest of one ALTER TABLE action: up to a comma outside parentheses or the statement's end.
Effects: fail.
Parser.insertTargets
function Parser.insertTargets(self: mut Parser): Vec<Target>Effects: fail, read, alloc.
Parser.targetSubscripts
function Parser.targetSubscripts(self: mut Parser): Vec<Vec<Expr>>Effects: fail, read, alloc.
Parser.tablesample
function Parser.tablesample(self: mut Parser): voidTABLESAMPLE method (args) [REPEATABLE (seed)]: every row is read; a sample is a subset of them.
Effects: fail.
Parser.currentOf
function Parser.currentOf(self: mut Parser): ExprThe condition after WHERE: CURRENT OF cursor, or an expression.
Effects: fail, read, alloc.