PHP 클래스 Prado\Data\SqlMap\Statements\TMappedStatement

This class is usualy instantiated during SQLMap configuration by TSqlDomBuilder.
부터: 3.0
상속: extends Prado\TComponent, implements Prado\Data\SqlMap\Statements\IMappedStatement
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
__construct ( TSqlMapManager $sqlMap, TSqlMapStatement $statement ) Creates a new mapped statement.
__sleep ( )
__wakeup ( )
executeInsert ( $connection, $parameter ) : string Execute an insert statement. Fill the parameter object with the ouput parameters if any, also could return the insert generated key.
executeQueryForList ( $connection, $parameter, $result = null, $skip, $max, $delegate = null ) : array Executes the SQL and retuns a List of result objects.
executeQueryForMap ( $connection, $parameter, $keyProperty, $valueProperty = null, $skip, $max, $delegate = null ) : array 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.
executeQueryForObject ( $connection, $parameter, $result = null ) Executes an SQL statement that returns a single row as an object of the type of the $result passed in as a parameter.
executeUpdate ( $connection, $parameter ) : integer Execute an update statement. Also used for delete statement.
getCommand ( ) : TPreparedCommand
getID ( ) : string
getManager ( ) : TSqlMapper
getSqlString ( )
getStatement ( ) : TSqlMapStatement
onExecuteQuery ( $sql ) Raise the execute query event.
runQueryForList ( $connection, $parameter, $sql, $result, $delegate = null ) : array Executes the SQL and retuns a List of result objects.
runQueryForMap ( $connection, $parameter, $command, $keyProperty, $valueProperty = null, $delegate = null ) : array 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.
runQueryForObject ( $connection, $command, &$result ) : object Executes an SQL statement that returns a single row as an object of the type of the $result passed in as a parameter.

보호된 메소드들

메소드 설명
addResultMapGroupBy ( $resultMap, $row, $parent, &$resultObject ) : object ResultMap with GroupBy property. Save object collection graph in a tree and collect the result later.
applyResultMap ( $row, &$resultObject = null ) : object Apply result mapping.
enquequePostSelect ( $select, $resultMap, $property, $row, $resultObject ) Add nested result property to post select queue.
executePostSelect ( $connection ) Process 'select' result properties
executeSQLQueryLimit ( $connection, $command, $max, $skip ) : mixed Execute SQL Query with limits.
executeSelectKey ( $connection, $parameter, $selectKey ) : string Execute the select key statement, used to obtain last insert ID.
fillArrayResultMap ( $resultMap, $row, $resultObject ) : array Retrieve the result map as an array.
fillDefaultResultMap ( $resultMap, $row, $resultObject ) : mixed Fill the result map using default settings. If $resultMap is null the result object returned will be guessed from $resultObject.
fillPropertyWithResultMap ( $resultMap, $row, &$resultObject ) : boolean Fills the property with result mapping results.
fillResultArrayList ( $row, $resultObject ) : object Apply the result to a TList or an array.
fillResultClass ( $resultClass, $row, $resultObject ) : object Fill the result using ResultClass, will creates new result object if required.
fillResultMap ( $resultMapName, $row, $parentGroup = null, &$resultObject = null ) : object Fills the result object according to result mappings.
fillResultObjectProperty ( $row, $resultObject ) : object Apply the result to an object.
getPostGeneratedSelectKey ( $connection, $parameter ) : string Gets the inserted row ID after executing an insert statement.
getPostSelectKeys ( $resultMap, $property, $row ) : array Finds in the post select property the SQL statement primary selection keys.
getPreGeneratedSelectKey ( $connection, $parameter ) : string Gets the insert generated ID before executing an insert statement.
getResultMapGroupKey ( $resultMap, $row ) : string Gets the result 'group by' groupping key for each row.
getScalarResult ( $result, $type ) : mixed Converts the first array value to scalar value of given type.
initialGroupByResults ( ) Empty the group by results cache.
raiseRowDelegate ( $handler, $param ) Raises delegate handler.
setObjectProperty ( $resultMap, $property, $row, &$resultObject ) Set a property of the result object with appropriate value.

메소드 상세

__construct() 공개 메소드

Creates a new mapped statement.
public __construct ( TSqlMapManager $sqlMap, TSqlMapStatement $statement )
$sqlMap Prado\Data\SqlMap\TSqlMapManager
$statement Prado\Data\SqlMap\Configuration\TSqlMapStatement

__sleep() 공개 메소드

public __sleep ( )

__wakeup() 공개 메소드

public __wakeup ( )

addResultMapGroupBy() 보호된 메소드

ResultMap with GroupBy property. Save object collection graph in a tree and collect the result later.
protected addResultMapGroupBy ( $resultMap, $row, $parent, &$resultObject ) : object
리턴 object result object.

applyResultMap() 보호된 메소드

Apply result mapping.
protected applyResultMap ( $row, &$resultObject = null ) : object
리턴 object the result filled with data, null if not filled.

enquequePostSelect() 보호된 메소드

Add nested result property to post select queue.
protected enquequePostSelect ( $select, $resultMap, $property, $row, $resultObject )

executeInsert() 공개 메소드

Execute an insert statement. Fill the parameter object with the ouput parameters if any, also could return the insert generated key.
public executeInsert ( $connection, $parameter ) : string
리턴 string the insert generated key.

executePostSelect() 보호된 메소드

Process 'select' result properties
protected executePostSelect ( $connection )

executeQueryForList() 공개 메소드

Executes the SQL and retuns a List of result objects.
또한 보기: executeQueryForList()
public executeQueryForList ( $connection, $parameter, $result = null, $skip, $max, $delegate = null ) : array
리턴 array a list of result objects

executeQueryForMap() 공개 메소드

If valueProperty is null, the entire result object will be entered.
public executeQueryForMap ( $connection, $parameter, $keyProperty, $valueProperty = null, $skip, $max, $delegate = null ) : array
리턴 array An array of object containing the rows keyed by keyProperty.

executeQueryForObject() 공개 메소드

Executes an SQL statement that returns a single row as an object of the type of the $result passed in as a parameter.
public executeQueryForObject ( $connection, $parameter, $result = null )

executeSQLQueryLimit() 보호된 메소드

Execute SQL Query with limits.
protected executeSQLQueryLimit ( $connection, $command, $max, $skip ) : mixed
리턴 mixed record set if applicable.

executeSelectKey() 보호된 메소드

Execute the select key statement, used to obtain last insert ID.
protected executeSelectKey ( $connection, $parameter, $selectKey ) : string
리턴 string last insert ID.

executeUpdate() 공개 메소드

Return the number of rows effected.
public executeUpdate ( $connection, $parameter ) : integer
리턴 integer The number of rows effected.

fillArrayResultMap() 보호된 메소드

Retrieve the result map as an array.
protected fillArrayResultMap ( $resultMap, $row, $resultObject ) : array
리턴 array array list of result objects.

fillDefaultResultMap() 보호된 메소드

Fill the result map using default settings. If $resultMap is null the result object returned will be guessed from $resultObject.
protected fillDefaultResultMap ( $resultMap, $row, $resultObject ) : mixed
리턴 mixed the result object filled with data.

fillPropertyWithResultMap() 보호된 메소드

Fills the property with result mapping results.
protected fillPropertyWithResultMap ( $resultMap, $row, &$resultObject ) : boolean
리턴 boolean true if the data was found, false otherwise.

fillResultArrayList() 보호된 메소드

Apply the result to a TList or an array.
protected fillResultArrayList ( $row, $resultObject ) : object
리턴 object result filled with data.

fillResultClass() 보호된 메소드

Fill the result using ResultClass, will creates new result object if required.
protected fillResultClass ( $resultClass, $row, $resultObject ) : object
리턴 object result object filled with data

fillResultMap() 보호된 메소드

Fills the result object according to result mappings.
protected fillResultMap ( $resultMapName, $row, $parentGroup = null, &$resultObject = null ) : object
리턴 object result object filled with data.

fillResultObjectProperty() 보호된 메소드

Apply the result to an object.
protected fillResultObjectProperty ( $row, $resultObject ) : object
리턴 object result filled with data.

getCommand() 공개 메소드

public getCommand ( ) : TPreparedCommand
리턴 TPreparedCommand command to prepare SQL statements.

getID() 공개 메소드

public getID ( ) : string
리턴 string Name used to identify the TMappedStatement amongst the others. This the name of the SQL statement by default.

getManager() 공개 메소드

public getManager ( ) : TSqlMapper
리턴 TSqlMapper The SqlMap used by this MappedStatement

getPostGeneratedSelectKey() 보호된 메소드

Gets the inserted row ID after executing an insert statement.
protected getPostGeneratedSelectKey ( $connection, $parameter ) : string
리턴 string last insert ID, null otherwise.

getPostSelectKeys() 보호된 메소드

Finds in the post select property the SQL statement primary selection keys.
protected getPostSelectKeys ( $resultMap, $property, $row ) : array
리턴 array list of primary key values.

getPreGeneratedSelectKey() 보호된 메소드

Gets the insert generated ID before executing an insert statement.
protected getPreGeneratedSelectKey ( $connection, $parameter ) : string
리턴 string new insert ID if pre-select key statement was executed, null otherwise.

getResultMapGroupKey() 보호된 메소드

Gets the result 'group by' groupping key for each row.
protected getResultMapGroupKey ( $resultMap, $row ) : string
리턴 string groupping key.

getScalarResult() 보호된 메소드

Converts the first array value to scalar value of given type.
protected getScalarResult ( $result, $type ) : mixed
리턴 mixed scalar value.

getSqlString() 공개 메소드

public getSqlString ( )

getStatement() 공개 메소드

public getStatement ( ) : TSqlMapStatement
리턴 Prado\Data\SqlMap\Configuration\TSqlMapStatement The SQL statment used by this MappedStatement

initialGroupByResults() 보호된 메소드

Empty the group by results cache.
protected initialGroupByResults ( )

onExecuteQuery() 공개 메소드

Raise the execute query event.
public onExecuteQuery ( $sql )

raiseRowDelegate() 보호된 메소드

This method is invoked for each new list item. It is the responsibility of the handler to add the item to the list.
protected raiseRowDelegate ( $handler, $param )

runQueryForList() 공개 메소드

This method should only be called by internal developers, consider using executeQueryForList() first.
또한 보기: executeQueryForList()
public runQueryForList ( $connection, $parameter, $sql, $result, $delegate = null ) : array
리턴 array a list of result objects

runQueryForMap() 공개 메소드

If valueProperty is null, the entire result object will be entered. This method should only be called by internal developers, consider using executeQueryForMap() first.
또한 보기: executeQueryForMap()
public runQueryForMap ( $connection, $parameter, $command, $keyProperty, $valueProperty = null, $delegate = null ) : array
리턴 array An array of object containing the rows keyed by keyProperty.

runQueryForObject() 공개 메소드

This method should only be called by internal developers, consider using executeQueryForObject() first.
또한 보기: executeQueryForObject()
public runQueryForObject ( $connection, $command, &$result ) : object
리턴 object the object.

setObjectProperty() 보호된 메소드

Set a property of the result object with appropriate value.
protected setObjectProperty ( $resultMap, $property, $row, &$resultObject )