This mixin provides SQL string methods such as (like and iLike).

Example
  1. sql.a.like("A%"); //=> "a" LIKE 'A%'
  2. sql.a.iLike("A%"); //=> "a" LIKE 'A%'
  3. sql.a.like(/^a/); //=> "a" ~* '^a'

Constructor

Defined sql.js Source
  1. define({

ilike Function Public


Defined sql.js

Create a patio.sql.BooleanExpression case insensitive pattern match of the receiver with the given patterns. See patio.sql.StringExpression#like.

Example
  1. sql.a.iLike("A%"); //=> "a" LIKE 'A%'
Arguments Returns Source
  1. function (expression){
  2. expression = argsToArray(arguments);
  3. return StringExpression.like.apply(StringExpression, [this].concat(expression).concat([
  4. {caseInsensitive: true}
  5. ]));
  6. }

like Function Public


Defined sql.js

Create a patio.sql.BooleanExpression case sensitive (if the database supports it) pattern match of the receiver with the given patterns. See patio.sql.StringExpression#like.

Example
  1. sql.a.like(/^a/); //=> "a" ~* '^a'
  2. sql.a.like("A%"); //=> "a" LIKE 'A%'
Arguments Source
  1. function (expression){
  2. expression = argsToArray(arguments);
  3. return StringExpression.like.apply(StringExpression, [this].concat(expression));
  4. }

Documentation generated using coddoc.