Table.select()
and
collection.find()
use different methods for
sorting results. Table.select()
follows the
SQL language naming and calls the sort method
orderBy()
.
Collection.find()
does not. Use the method
sort()
to sort the results returned by
Collection.find()
. Proximity with the SQL
standard is considered more important than API uniformity here.
The syntax for this function shown in EBNF is:
Press CTRL+C to copyTableSelectFunction ::= '.select(' ProjectedSearchExprStrList? ')' ( '.where(' SearchConditionStr ')' )? ( '.groupBy(' SearchExprStrList ')' )? ( '.having(' SearchConditionStr ')' )? ( '.orderBy(' SortExprStrList ')' )? ( '.limit(' NumberOfRows ')' ( '.offset(' NumberOfRows ')' )? )? ( '.lockExclusive(' LockContention ')' | '.lockShared(' LockContention ')' )? ( '.bind(' ( PlaceholderValues ) ')' )* ( '.execute()' )?
The syntax for this function shown in EBNF is:
Press CTRL+C to copyTableInsertFunction ::= '.insert(' ( TableFields )? ')' ( '.values(' ExprOrLiteral (',' ExprOrLiteral)* ')' )+ ( '.execute()' )?
The syntax for this function shown in EBNF is:
Press CTRL+C to copyTableUpdateFunction ::= '.update()' ( '.set(' TableField ',' ExprOrLiteral ')' )+ '.where(' SearchConditionStr ')' ( '.orderBy(' SortExprStrList ')' )? ( '.limit(' NumberOfRows ')' )? ( '.bind(' ( PlaceholderValues ) ')' )* ( '.execute()' )?
The syntax for this function shown in EBNF is:
Press CTRL+C to copyTableDeleteFunction ::= '.delete()' '.where(' SearchConditionStr ')' ( '.orderBy(' SortExprStrList ')' )? ( '.limit(' NumberOfRows ')' )? ( '.bind(' ( PlaceholderValues ) ')' )* ( '.execute()' )?