Classes


Namespace DB.sqlHandler

DB.sqlHandler works similar to a SQL prepared statement in that the query is not executed unless explicitly called. It should not be created explicitly; rather, use DB.sql to generate a new sqlHandler object

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
DB.sqlHandler.execute()
execute the SQL prepared statement returned by getsql()
<static>  
DB.sqlHandler.filter(conditions)
add additional Conditions to the SQL statement
<static>  
DB.sqlHandler.getsql()
return the constructed SQL prepared statement
<static>  
DB.sqlHandler.include(field_name)
specify additional SELECT fields to the SQL statement
<static>  
DB.sqlHandler.limit(offset_limit)
add an offset,limit tuple to the SQL statement
<static>  
DB.sqlHandler.sort(sort)
add an ORDER BY clause to the SQL statement
Namespace Detail
DB.sqlHandler
See:
DB.sql
Method Detail
<static> {Array} DB.sqlHandler.execute()
execute the SQL prepared statement returned by getsql()
Returns:
{Array} the entries returned by the query
See:
DB.sql

<static> DB.sqlHandler.filter(conditions)
add additional Conditions to the SQL statement
 <?
 	var handler = DB.sql('SELECT supporter_KEY FROM supporter')
 			.filter(new Condition('Email','=','email@example.com'));
 ?>
Parameters:
{Conditions[]} conditions
add WHERE conditions.
See:
DB.sql
Condition

<static> {String} DB.sqlHandler.getsql()
return the constructed SQL prepared statement
Returns:
{String} the SQL statement as a String object

<static> {DB.sqlHandler} DB.sqlHandler.include(field_name)
specify additional SELECT fields to the SQL statement
 <?
 	var handler = DB.sql('SELECT supporter_KEY FROM supporter')
 			.include('Email', 'Source_Details');
 ?>
Parameters:
{String} field_name
field to include
Returns:
{DB.sqlHandler}
See:
DB.sql

<static> {DB.sqlHandler} DB.sqlHandler.limit(offset_limit)
add an offset,limit tuple to the SQL statement
 <?
 	var handler = DB.sql('SELECT supporter_KEY FROM supporter')
 			.limit("50,100");
 ?>
Parameters:
{string} offset_limit
the limit param is in the format "offset, limit"
Returns:
{DB.sqlHandler}

<static> {DB.sqlHandler} DB.sqlHandler.sort(sort)
add an ORDER BY clause to the SQL statement
 <?
 	var handler = DB.sql('SELECT supporter_KEY FROM supporter')
 			.sort('supporter_KEY DESC');
 ?>
Parameters:
sort
Returns:
{DB.sqlHandler}

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 14 2011 05:41:50 GMT-0400 (EDT)