This mixin provides ordering methods ("asc", "desc") to expression.

Example
sql.name.asc(); //=> name ASC
sql.price.desc(); //=> price DESC
sql.name.asc({nulls:"last"}); //=> name ASC NULLS LAST
sql.price.desc({nulls:"first"}); //=> price DESC NULLS FIRST
            

Constructor

Defined sql.js Source
define({
            

asc Function Public


Defined sql.js

Mark the receiving SQL column as sorting in an ascending fashion (generally a no-op).

Example
sql.name.asc(); //=> name ASC
sql.name.asc({nulls:"last"}); //=> name ASC NULLS LAST
        
Arguments Returns Source
function (options){
   return new OrderedExpression(this, false, options);
           
}
    

desc Function Public


Defined sql.js

Mark the receiving SQL column as sorting in a descending fashion.

Example
sql.price.desc(); //=> price DESC
sql.price.desc({nulls:"first"}); //=> price DESC NULLS FIRST
        
Arguments Returns Source
function (options){
   return new OrderedExpression(this, true, options);
           
}
    

Documentation generated using coddoc.