PHP 클래스 Prado\Data\SqlMap\TSqlMapGateway

# execute an update query (including insert and delete). # execute a select query for a single object # execute a select query for a list of objects This class should be instantiated from a TSqlMapManager instance.
부터: 3.1
상속: extends Prado\TComponent
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
__construct ( $manager )
delete ( $statementName, $parameter = null ) : integer Executes a Sql DELETE statement. Delete returns the number of rows effected.
flushCaches ( ) Flushes all cached objects that belong to this SqlMap
getDbConnection ( ) : TDbConnection
getSqlMapManager ( ) : TSqlMapManager
insert ( $statementName, $parameter = null ) : mixed Executes a Sql INSERT statement.
queryForList ( $statementName, $parameter = null, $result = null, $skip, $max ) : TList Executes a Sql SELECT statement that returns data to populate a number of result objects.
queryForMap ( $statementName, $parameter = null, $keyProperty = null, $valueProperty = null, $skip, $max ) : TMap Executes the SQL and retuns all rows selected in a map that is keyed on the property named in the keyProperty parameter. The value at each key will be the value of the property specified in the valueProperty parameter. If valueProperty is null, the entire result object will be entered.
queryForMapWithRowDelegate ( $statementName, $delegate, $parameter = null, $keyProperty = null, $valueProperty = null, $skip, $max ) : TMap Runs a query with a custom object that gets a chance to deal with each row as it is processed.
queryForObject ( $statementName, $parameter = null, $result = null ) : object Executes a Sql SELECT statement that returns that returns data to populate a single object instance.
queryForPagedList ( $statementName, $parameter = null, $pageSize = 10, $page ) : TPagedList Executes the SQL and retuns a subset of the results in a dynamic TPagedList that can be used to automatically scroll through results from a database table.
queryForPagedListWithRowDelegate ( $statementName, $delegate, $parameter = null, $pageSize = 10, $page ) : TPagedList Executes the SQL and retuns a subset of the results in a dynamic TPagedList that can be used to automatically scroll through results from a database table.
queryWithRowDelegate ( $statementName, $delegate, $parameter = null, $result = null, $skip, $max ) : TList Runs a query for list with a custom object that gets a chance to deal with each row as it is processed.
registerTypeHandler ( $typeHandler )
update ( $statementName, $parameter = null ) : integer Executes a Sql UPDATE statement.

메소드 상세

__construct() 공개 메소드

public __construct ( $manager )

delete() 공개 메소드

Executes a Sql DELETE statement. Delete returns the number of rows effected.
public delete ( $statementName, $parameter = null ) : integer
리턴 integer The number of rows effected.

flushCaches() 공개 메소드

Flushes all cached objects that belong to this SqlMap
public flushCaches ( )

getDbConnection() 공개 메소드

public getDbConnection ( ) : TDbConnection
리턴 TDbConnection database connection.

getSqlMapManager() 공개 메소드

public getSqlMapManager ( ) : TSqlMapManager
리턴 TSqlMapManager sqlmap manager.

insert() 공개 메소드

Insert is a bit different from other update methods, as it provides facilities for returning the primary key of the newly inserted row (rather than the effected rows), The parameter object is generally used to supply the input data for the INSERT values.
public insert ( $statementName, $parameter = null ) : mixed
리턴 mixed The primary key of the newly inserted row. This might be automatically generated by the RDBMS, or selected from a sequence table or other source.

queryForList() 공개 메소드

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
public queryForList ( $statementName, $parameter = null, $result = null, $skip, $max ) : TList
리턴 TList A List of result objects.

queryForMap() 공개 메소드

Executes the SQL and retuns all rows selected in a map that is keyed on the property named in the keyProperty parameter. The value at each key will be the value of the property specified in the valueProperty parameter. If valueProperty is null, the entire result object will be entered.
public queryForMap ( $statementName, $parameter = null, $keyProperty = null, $valueProperty = null, $skip, $max ) : TMap
리턴 TMap Array object containing the rows keyed by keyProperty.

queryForMapWithRowDelegate() 공개 메소드

Example: $sqlmap->queryForMapWithRowDelegate('getAccounts', array($this, 'rowHandler'));
public queryForMapWithRowDelegate ( $statementName, $delegate, $parameter = null, $keyProperty = null, $valueProperty = null, $skip, $max ) : TMap
리턴 TMap Array object containing the rows keyed by keyProperty.

queryForObject() 공개 메소드

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
public queryForObject ( $statementName, $parameter = null, $result = null ) : object
리턴 object A single result object populated with the result set data.

queryForPagedList() 공개 메소드

Executes the SQL and retuns a subset of the results in a dynamic TPagedList that can be used to automatically scroll through results from a database table.
public queryForPagedList ( $statementName, $parameter = null, $pageSize = 10, $page ) : TPagedList
리턴 TPagedList A PaginatedList of beans containing the rows.

queryForPagedListWithRowDelegate() 공개 메소드

Runs paged list query with row delegate Example: $sqlmap->queryForPagedListWithRowDelegate('getAccounts', array($this, 'rowHandler'));
public queryForPagedListWithRowDelegate ( $statementName, $delegate, $parameter = null, $pageSize = 10, $page ) : TPagedList
리턴 TPagedList A PaginatedList of beans containing the rows.

queryWithRowDelegate() 공개 메소드

Example: $sqlmap->queryWithRowDelegate('getAccounts', array($this, 'rowHandler'));
public queryWithRowDelegate ( $statementName, $delegate, $parameter = null, $result = null, $skip, $max ) : TList
리턴 TList A List of result objects.

registerTypeHandler() 공개 메소드

public registerTypeHandler ( $typeHandler )

update() 공개 메소드

Update can also be used for any other update statement type, such as inserts and deletes. Update returns the number of rows effected. The parameter object is generally used to supply the input data for the UPDATE values as well as the WHERE clause parameter(s).
public update ( $statementName, $parameter = null ) : integer
리턴 integer The number of rows effected.