IF Commons GitHub

logical/analyze

Written to: 3 requirements: 3 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-query-language FR-003, 0002-query-language FR-004, 0002-query-language FR-007

A query read (commons anyfs-query 0002-query-language FR-003, FR-004, FR-007): text to the plan of one SELECT of one source, through the parse, the profile, the binding of names and the types, with every failure one value of the closed type of problems and the span of what was wrong. The source is a table of the language, or a table function over a place: files('s3://bucket/prefix').

Source: commons/anyfs-query/src/logical/analyze.ts

1 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

Origintypeno test imports it
type Origin = { readonly table: TableName; readonly place: string | undefined };

What a query reads from: a table and, where the query names one, the place.

OutColumntypeno test imports it
type OutColumn = { readonly name: string; readonly type: Type };

A column a query gives.

Analyzedtypeno test imports it
type Analyzed = {
  readonly text: string;
  readonly select: Select;
  readonly origin: Origin;
  readonly plan: Plan;
  readonly bindings: Bindings;
  /** The filter of the plan, as the planner simplified it. */
  readonly predicate: Expr | undefined;
  readonly columns: readonly OutColumn[];
};

A query that is read, bound, typed and planned.

analyzefunction
function analyze(text: string): Result<Analyzed, QueryProblem>

Reads a query and plans it.

Imported by 15 tests of the run (15 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.