Module query/normalizer

A query normalizer capable of converting a query AST back into a query string



Normalizer.prototype.visitAggregation (node)

Normalizes an aggregation node

Parameters

Aggregation node The node

Returns

String The string representation

Normalizer.prototype.visitBetweenCondition (node)

Normalizes the "between" condition node

Parameters

BetweenCondition node The node

Returns

String The string representation

Normalizer.prototype.visitComparison (node)

Normalizes the comparison node

Parameters

Comparison node The comparison node

Returns

String The string representation

Normalizer.prototype.visitCondition (node)

Normalizes the condition node

Parameters

Condition node The condition

Returns

String The string representation

Normalizer.prototype.visitConditionList (node)

Normalizes the list of conditions

Parameters

ConditionList node The node

Returns

String The string representation

Normalizer.prototype.visitEntity (node)

Returns the name of the entity node

Parameters

Entity node The entity node

Returns

String The name of the entity

Normalizer.prototype.visitExistCondition (node)

Normalizes the "exists" condition node

Parameters

ExistsCondition node The "exists" condition

Returns

String The string representation

Normalizer.prototype.visitExpression (node)

Normalizes the expression node

Parameters

Expression node The node

Returns

String The string representation

Normalizer.prototype.visitFactor (node)

Normalizes the factor node

Parameters

Summand node The factor node

Returns

String The factor node as string

Normalizer.prototype.visitFromClause (node)

Normalizes the "from" clause node

Parameters

FromClause node The node

Returns

String The string representation

Normalizer.prototype.visitGroupByClause (node)

Normalizes the "group by" clause node

Parameters

GroupByClause node The node

Returns

String The string representation

Normalizer.prototype.visitHavingClause (node)

Normalizes the "having" clause node

Parameters

HavingClause node The node

Returns

String The string representation

Normalizer.prototype.visitIdent (node)

Returns the fully qualified representation of the ident node

Parameters

Ident node The ident node

Returns

String The string representation (`.`)

Normalizer.prototype.visitInCondition (node)

Normalizes the "(not) in" condition node

Parameters

InCondition node The node

Returns

String The string representation

Normalizer.prototype.visitInnerJoin (node)

Normalizes the "inner join" node

Parameters

InnerJoin node The node

Returns

String The string representation

Normalizer.prototype.visitIsNullCondition (node)

Normalizes the "is (not) null" condition node

Parameters

IsNullCondition node The node

Returns

String The string representation

Normalizer.prototype.visitJoinClause (node)

Normalizes the "join" clause node

Parameters

JoinClause node The node

Returns

String The string representation

Normalizer.prototype.visitLikeCondition (node)

Normalizes the "like" condition node

Parameters

LikeCondition node The node

Returns

String The string representation

Normalizer.prototype.visitNotCondition (node)

Normalizes the NotCondition node

Parameters

NotCondition node The "not" condition

Returns

String The string representation

Normalizer.prototype.visitOrderBy (node)

Normalizes the "order by" node

Parameters

OrderBy node The node

Returns

String The string representation

Normalizer.prototype.visitOrderByClause (node)

Normalizes the "order by" clause node

Parameters

OrderByClause node The node

Returns

String The string representation

Normalizer.prototype.visitOuterJoin (node)

Normalizes the "outer join" clause node

Parameters

OuterJoin node The node

Returns

String The string representation

Normalizer.prototype.visitParameterValue (node)

Returns the value of the parameter value, preceded by a colon.

Parameters

ParameterValue node The parameter value node

Returns

String The parameter value as string

Normalizer.prototype.visitRangeClause (node)

Normalizes the range clause node

Parameters

RangeClause node The node

Returns

String The string representation

Normalizer.prototype.visitSelect (node)

Normalizes the select query

Parameters

Select node The node

Returns

String The string representation

Normalizer.prototype.visitSelectClause (node)

Normalizes the select clause node

Parameters

SelectClause node The node

Returns

String The string representation

Normalizer.prototype.visitSelectEntity (node)

Normalizes the select entity node

Parameters

SelectEntity node The node

Returns

String The string representation

Normalizer.prototype.visitSelectExpression (node)

Normalizes the select expression node

Parameters

SelectExpression node The node

Returns

String The string representation

Normalizer.prototype.visitSummand (node)

Normalizes the summand node

Parameters

Summand node The summand node

Returns

String The summand node as string

Normalizer.prototype.visitValue (node)

Returns the value of a value node

Parameters

Value node

Returns

String The value of the node

Normalizer.prototype.visitWhereClause (node)

Normalizes the "where" clause node

Parameters

WhereClause node The node

Returns

String The string representation