IF Commons GitHub

aide/normalize/mod

Simplifying (commons lang-sql 0010-aide FR-005): simplify gives an expression that has the same value for every row, with constants folded, NOT pushed to the leaves, BETWEEN and a short IN written as comparisons, and AND and OR flat with TRUE and FALSE taken out; conjuncts and conjoin split and join the top-level AND. A new node keeps the range of the node it replaces.

Spec: 0010-aide FR-005

Source: commons/lang-sql/src/aide/normalize/mod.ts

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

conjunctsfunction
function conjuncts(e: Expr): readonly Expr[]

The operands of the top-level AND of an expression, in order.

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

conjoinfunction
function conjoin(list: readonly Expr[]): Expr | undefined

The operands joined by AND from the left; undefined for none.

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

simplifyfunction
function simplify(e: Expr): Expr

An expression with the same value for every row, simplified.

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

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