API Docs for: 1.0.1
Show:

sqlFun Class

Defined in: src\jsDataQuery.js:95
Module: jsDataQuery

Function with ability to be converted to sql. When invoked gives a result depending on the arguments.

Constructor

sqlFun

() public

Methods

myRegExpEscape

(
  • str
)
String private

Escapes special characters in a string

Parameters:

  • str Object

    the string to be escaped

Returns:

String:

escaped string

toSql

(
  • formatter
  • context
)
String public

Converts a SqlFun into a string

Parameters:

  • formatter SqlFormatter

    used to obtain details about making the expression, see sqlFormatter for an example

  • context Environment

    is the context into which the expression have to be evaluated

Returns:

String:

//the sql representation of the expression

Properties

constant

Boolean public

constant true if it is a constant expression, false otherwise

fieldName

String public

name of this field in the select result

isFalse

Boolean public

true if the function is the false constant

isTrue

Boolean public

true if the function is the true constant

tableName

String public

table to which this field has been taken in a select