This is the parent of all expressions.
This is a helper method that will take in an array of arguments and return an expression.
Example
QualifiedIdentifier.fromArgs(["table", "column"]);
Arguments
array of arguments to pass into the constructor of the function.
patio.sql.Expression an expression.
function (args){
var ret, Self = this;
try {
ret = new Self();
} catch (ignore) {
}
this.apply(ret, args);
return ret;
}
Helper to determine if something is a condition specifier. Returns true if the object is a Hash or is an array of two element arrays.
Example
Expression.isConditionSpecifier({a : "b"}); //=> true
Expression.isConditionSpecifier("a"); //=> false
Expression.isConditionSpecifier([["a", "b"], ["c", "d"]]); //=> true
Expression.isConditionSpecifier([["a", "b", "e"], ["c", "d"]]); //=> false
Arguments
object to test if it is a condition specifier
Boolean true if the object is a Hash or is an array of two element arrays.
function (obj){
return isHash(obj) || (isArray(obj) && obj.length && obj.every(function (i) {
return isArray(i) && i.length === 2;
}));
}
Returns the string representation of this expression
Argumentsthe dataset that will be used to SQL-ify this expression.
String a string literal version of this expression.
function (ds){
return this.toString(ds);
}