|
Class TSqlCriteria
Search criteria for TDbDataGateway.
Criteria object for data gateway finder methods. Usage:
$criteria = new TSqlCriteria();
$criteria->Parameters[':name'] = 'admin';
$criteria->Parameters[':pass'] = 'prado';
$criteria->OrdersBy['level'] = 'desc';
$criteria->OrdersBy['name'] = 'asc';
$criteria->Limit = 10;
$criteria->Offset = 20;
-
TComponent
-
TSqlCriteria
Methods summary
public
|
#
__construct( string $condition = null, mixed $parameters = array() )
Creates a new criteria with given condition;
Creates a new criteria with given condition;
Parameters
- $condition
string sql string after the WHERE stanza
- $parameters
mixed named or indexed parameters, accepts as multiple arguments.
Overrides
|
public
mixed
|
#
getSelect( )
Gets the field list to be placed after the SELECT in the SQL. Default to
'*'
Gets the field list to be placed after the SELECT in the SQL. Default to
'*'
Returns
mixed
Since
3.1.7
|
public
|
#
setSelect( mixed $value )
Sets the field list to be placed after the SELECT in the SQL.
Sets the field list to be placed after the SELECT in the SQL.
Different behavior depends on type of assigned value string usage without
modification
null will be expanded to full list of quoted table column names (quoting
depends on database)
array
array('mycol1' => 'col1', 'mycol2' => 'COUNT(*)')
- NULL and scalar values (strings will be quoted depending on database)
array('col1' => 'my custom string', 'col2' => 1.0, 'col3' => 'NULL')
- If the *-wildcard char is used as key or value, add the full list of quoted
table column names
array('col1' => 'NULL', '*')
Parameters
Since
3.1.7
See
|
public
string
|
#
getCondition( )
Returns
string search conditions.
|
public
|
#
setCondition( string $value )
Sets the search conditions to be placed after the WHERE clause in the
SQL.
Sets the search conditions to be placed after the WHERE clause in the
SQL.
Parameters
- $value
string search conditions.
|
public
TAttributeCollection
|
|
public
|
#
setParameters( ArrayAccess $value )
Parameters
- $value
ArrayAccess named parameters.
|
public
boolean
|
#
getIsNamedParameters( )
Returns
boolean true if the parameter index are string base, false otherwise.
|
public
TAttributeCollection
|
|
public
|
#
setOrdersBy( mixed $value )
Parameters
- $value
mixed ordering clause.
|
public
integer
|
#
getLimit( )
Returns
integer maximum number of records to return.
|
public
|
#
setLimit( integer $value )
Parameters
- $value
integer maximum number of records to return.
|
public
integer
|
#
getOffset( )
Returns
integer record offset.
|
public
|
#
setOffset( integer $value )
Parameters
- $value
integer record offset.
|
public
string
|
#
__toString( )
Returns
string string representation of the parameters. Useful for debugging.
|
Methods inherited from TComponent
__call(),
__destruct(),
__get(),
__isset(),
__set(),
__sleep(),
__unset(),
__wakeup(),
addParsedObject(),
asa(),
attachBehavior(),
attachBehaviors(),
attachClassBehavior(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
clearBehaviors(),
createdOnTemplate(),
detachBehavior(),
detachBehaviors(),
detachClassBehavior(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
evaluateStatements(),
fxAttachClassBehavior(),
fxDetachClassBehavior(),
getAutoGlobalListen(),
getBehaviorsEnabled(),
getClassHierarchy(),
getEventHandlers(),
getListeningToGlobalEvents(),
getSubProperty(),
hasEvent(),
hasEventHandler(),
hasProperty(),
isa(),
listen(),
raiseEvent(),
setSubProperty(),
unlisten()
|
|