PHP 클래스 Prado\Data\DataGateway\TSqlCriteria

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;
부터: 3.1
상속: extends Prado\TComponent
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $condition = null, $parameters = [] ) Creates a new criteria with given condition;
__toString ( ) : string
getCondition ( ) : string
getIsNamedParameters ( ) : boolean
getLimit ( ) : integer
getOffset ( ) : integer
getOrdersBy ( ) : TAttributeCollection
getParameters ( ) : TAttributeCollection
getSelect ( ) : mixed Gets the field list to be placed after the SELECT in the SQL. Default to '*'
setCondition ( $value ) Sets the search conditions to be placed after the WHERE clause in the SQL.
setLimit ( $value )
setOffset ( $value )
setOrdersBy ( $value )
setParameters ( $value )
setSelect ( $value ) Sets the field list to be placed after the SELECT in the SQL.

메소드 상세

__construct() 공개 메소드

Creates a new criteria with given condition;
public __construct ( $condition = null, $parameters = [] )

__toString() 공개 메소드

public __toString ( ) : string
리턴 string string representation of the parameters. Useful for debugging.

getCondition() 공개 메소드

public getCondition ( ) : string
리턴 string search conditions.

getIsNamedParameters() 공개 메소드

public getIsNamedParameters ( ) : boolean
리턴 boolean true if the parameter index are string base, false otherwise.

getLimit() 공개 메소드

public getLimit ( ) : integer
리턴 integer maximum number of records to return.

getOffset() 공개 메소드

public getOffset ( ) : integer
리턴 integer record offset.

getOrdersBy() 공개 메소드

public getOrdersBy ( ) : TAttributeCollection
리턴 Prado\Collections\TAttributeCollection ordering clause.

getParameters() 공개 메소드

public getParameters ( ) : TAttributeCollection
리턴 Prado\Collections\TAttributeCollection list of named parameters and values.

getSelect() 공개 메소드

Gets the field list to be placed after the SELECT in the SQL. Default to '*'
부터: 3.1.7
public getSelect ( ) : mixed
리턴 mixed

setCondition() 공개 메소드

Sets the search conditions to be placed after the WHERE clause in the SQL.
public setCondition ( $value )

setLimit() 공개 메소드

public setLimit ( $value )

setOffset() 공개 메소드

public setOffset ( $value )

setOrdersBy() 공개 메소드

public setOrdersBy ( $value )

setParameters() 공개 메소드

public setParameters ( $value )

setSelect() 공개 메소드

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 - Column names will be quoted if used as key or value of array array('col1', 'col2', 'col2') SELECT col1, col2, col3 FROM... - Column aliasing array('mycol1' => 'col1', 'mycol2' => 'COUNT(*)') SELECT col1 AS mycol1, COUNT(*) AS mycol2 FROM... - NULL and scalar values (strings will be quoted depending on database) array('col1' => 'my custom string', 'col2' => 1.0, 'col3' => 'NULL') SELECT "my custom string" AS col1, 1.0 AS col2, NULL AS col3 FROM... - If the *-wildcard char is used as key or value, add the full list of quoted table column names array('col1' => 'NULL', '*') SELECT col1, col2, col3, NULL AS col1 FROM...
또한 보기: TDbCommandBuilder::getSelectFieldList()
부터: 3.1.7
public setSelect ( $value )