Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MqlTreeCompiler

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

defs

defs: object

Type declaration

  • [idx: string]: boolean

functionsToInline

functionsToInline: object[]

prepend

prepend: string[]

sets

sets: object

Type declaration

  • [idx: string]: boolean

Static binOpText

binOpText: "let __binopNull = (isCond, opFunc, left, right) => {return !isCond && (left === null || right === null) ? null : opFunc(left, right);};let __binop = (isCond, left, right, opFunc, cb) => {return Callbacks.Reduce([left, right],([left, right]) => __binopNull(isCond, opFunc, left, right),cb);};" = `let __binopNull = (isCond, opFunc, left, right) => {return !isCond && (left === null || right === null) ? null : opFunc(left, right);};let __binop = (isCond, left, right, opFunc, cb) => {return Callbacks.Reduce([left, right],([left, right]) => __binopNull(isCond, opFunc, left, right),cb);};`

Static getValueOrNullText

getValueOrNullText: "let __getValueOrNull = (row, col) => {if (row == null) throw new Error("Cannot SELECT " + col + " from null row. Did you mean to use @" + col + "?")let value = row.getValue(col);return typeof value !== 'undefined' ? value : null;};" = `let __getValueOrNull = (row, col) => {if (row == null) throw new Error("Cannot SELECT " + col + " from null row. Did you mean to use @" + col + "?")let value = row.getValue(col);return typeof value !== 'undefined' ? value : null;};`

Static inExprText

inExprText: "let __inExpr = (row, isNot, needle, haystack, cb) => {Callbacks.All([...haystack.map(i => i.bind(void 0, row)), needle.bind(void 0, row)], (err, res) => {if (err) return cb(err);const needle = res[0];const haystack = res.slice(1);return cb(void 0, !!(+(haystack.indexOf(needle) !== -1) ^ (+isNot)));})};let __inExprFast = (row, isNot, needleFunc, haystack, cb) => {needleFunc(row, (err, needle) => {if (err) return cb(err);return cb(void 0, !!(+(haystack.has(needle)) ^ (+isNot)));});};" = `let __inExpr = (row, isNot, needle, haystack, cb) => {Callbacks.All([...haystack.map(i => i.bind(void 0, row)), needle.bind(void 0, row)], (err, res) => {if (err) return cb(err);const needle = res[0];const haystack = res.slice(1);return cb(void 0, !!(+(haystack.indexOf(needle) !== -1) ^ (+isNot)));})};let __inExprFast = (row, isNot, needleFunc, haystack, cb) => {needleFunc(row, (err, needle) => {if (err) return cb(err);return cb(void 0, !!(+(haystack.has(needle)) ^ (+isNot)));});};`

Static unOpText

unOpText: "let __unOpNull = (opFunc, left) => {return left === null ? null : opFunc(left);};let __unop = (left, opFunc, cb) => {left((err, res) => {if (err) return cb(err);return cb(void 0, __unOpNull(opFunc, res));})};" = `let __unOpNull = (opFunc, left) => {return left === null ? null : opFunc(left);};let __unop = (left, opFunc, cb) => {left((err, res) => {if (err) return cb(err);return cb(void 0, __unOpNull(opFunc, res));})};`

Methods

binaryExprToExpression

  • binaryExprToExpression(ctx: any): string

getPrepends

  • getPrepends(): string

groupByToArray

  • groupByToArray(ctx: any): string

inlineFunction

  • inlineFunction(funcName: string): string

parseExpression

  • parseExpression(ctx: any): string

parseExpressionList

  • parseExpressionList(ctx: any): any

parseQuery

  • parseQuery(ctx: any): string

unaryExprToExpression

  • unaryExprToExpression(ctx: any): any

visit

  • visit(ctx: any): any

visitAdditionExpression

  • visitAdditionExpression(ctx: any): string

visitAndExpression

  • visitAndExpression(ctx: any): string

visitAssignment

  • visitAssignment(ctx: any): any

visitAssignment_list_comma_separated

  • visitAssignment_list_comma_separated(ctx: any): string

visitAssignment_list_semicolon_separated

  • visitAssignment_list_semicolon_separated(ctx: any): any

visitAt_identifier

  • visitAt_identifier(ctx: any): any

visitChildren

  • visitChildren(ctx: any): any

visitContextual_keywords

  • visitContextual_keywords(ctx: any): any

visitCustom_literal

  • visitCustom_literal(ctx: any): any

visitDef_statement

  • visitDef_statement(ctx: any): any

visitDefinition_list

  • visitDefinition_list(ctx: any): any

visitDisplayed_column

  • visitDisplayed_column(ctx: any): string

visitEndregion_statement

  • visitEndregion_statement(ctx: any): any

visitEqualityExpression

  • visitEqualityExpression(ctx: any): string

visitErrorNode

  • visitErrorNode(node: ErrorNode): any
  • Parameters

    • node: ErrorNode

    Returns any

visitEscaped_identifier

  • visitEscaped_identifier(ctx: any): any

visitExpression

  • visitExpression(ctx: any): any

visitExpression_list

  • visitExpression_list(ctx: any): any

visitExpression_standalone

  • visitExpression_standalone(ctx: any): any

visitFalseLiteral

  • visitFalseLiteral(ctx: any): any

visitFloat_vector

  • visitFloat_vector(ctx: any): any

visitFormat

  • visitFormat(ctx: any): any

visitFunctionExpression

  • visitFunctionExpression(ctx: any): any

visitFunction_definition

  • visitFunction_definition(ctx: any): any

visitGroup_clause

  • visitGroup_clause(ctx: any): any

visitHash_statement

  • visitHash_statement(ctx: any): any

visitHaving_clause

  • visitHaving_clause(ctx: any): any

visitHere_document

  • visitHere_document(ctx: any): any

visitIdentifier

  • visitIdentifier(ctx: any): any

visitImport_statement

  • visitImport_statement(ctx: any): any

visitInExpression

  • visitInExpression(ctx: any): any

visitLiteral_double

  • visitLiteral_double(ctx: any): string

visitLiteral_string

  • visitLiteral_string(ctx: any): any

visitLiteral_table

  • visitLiteral_table(ctx: any): any

visitLiteral_table_column

  • visitLiteral_table_column(ctx: any): any

visitLiteral_table_row

  • visitLiteral_table_row(ctx: any): any

visitMql_literal

  • visitMql_literal(ctx: any): any

visitMql_query

  • visitMql_query(ctx: any): any

visitMultiplicativeExpression

  • visitMultiplicativeExpression(ctx: any): string

visitNegationExpression

  • visitNegationExpression(ctx: any): any

visitNegative_literal_double

  • visitNegative_literal_double(ctx: any): any

visitNon_at_param_set_statement

  • visitNon_at_param_set_statement(ctx: any): any

visitNon_at_param_set_statement_list

  • visitNon_at_param_set_statement_list(ctx: any): any

visitNon_function_non_at_identifier

  • visitNon_function_non_at_identifier(ctx: any): any

visitNormal_identifier

  • visitNormal_identifier(ctx: any): any

visitNotExpression

  • visitNotExpression(ctx: any): any

visitNullLiteral

  • visitNullLiteral(ctx: any): any

visitOrExpression

  • visitOrExpression(ctx: any): string

visitOrder_clause

  • visitOrder_clause(ctx: any): any

visitParenthesisExpression

  • visitParenthesisExpression(ctx: any): any

visitPrimaryExpression

  • visitPrimaryExpression(ctx: any): any

visitQuery_sets_defs

  • visitQuery_sets_defs(ctx: any): any

visitQuery_sets_defs_regions

  • visitQuery_sets_defs_regions(ctx: any): any

visitRegion_or_displayed_column

  • visitRegion_or_displayed_column(ctx: any): any

visitRegion_statement

  • visitRegion_statement(ctx: any): any

visitRelationExpression

  • visitRelationExpression(ctx: any): string

visitSelect_list

  • visitSelect_list(ctx: any): any

visitSelect_statement

  • visitSelect_statement(ctx: any): any

visitSet_statement

  • visitSet_statement(ctx: any): any

visitSet_statement_list

  • visitSet_statement_list(ctx: any): any

visitSorted_def

  • visitSorted_def(ctx: any): any

visitString_vector

  • visitString_vector(ctx: any): any

visitTerminal

  • visitTerminal(node: TerminalNode): any
  • Parameters

    • node: TerminalNode

    Returns any

visitTrueLiteral

  • visitTrueLiteral(ctx: any): any

visitWhere_clause

  • visitWhere_clause(ctx: any): any

visitXorExpression

  • visitXorExpression(ctx: any): string

Static binaryOpIsCond

  • binaryOpIsCond(token: number): boolean

Static escapeDoubleQuoted

  • escapeDoubleQuoted(str: string): string

Static mapBinaryOperation

  • mapBinaryOperation(op: any): string

Static mapUnaryOperation

  • mapUnaryOperation(token: number): string | null

Static unescapeIdentifier

  • unescapeIdentifier(id: string): string

Generated using TypeDoc