Interface IMappedStatement
Interface for all mapping statements.
| Method Summary |
|
TList
|
Executes the SQL and retuns a subset of the rows selected.
|
|
TMap
|
executeQueryForMap
( IDbConnection $connection, mixed $parameter, string $keyProperty, string $valueProperty)
Executes the SQL and retuns all rows selected in a map that is keyed on
|
|
object result.
|
Executes an SQL statement that returns a single row as an object of the type of the <tt>$result</tt> passed in as a parameter.
|
|
integer
|
Execute an update statement. Also used for delete statement. Return the number of row effected.
|
|
string
|
|
|
TSqlMap
|
|
|
TSqlMapStatement
|
|
| Method Details |
executeQueryForList
| public TList executeQueryForList |
(IDbConnection $connection , mixed $parameter , TList $result , integer $skip , integer $max ) |
Executes the SQL and retuns a subset of the rows selected.
| Input |
| IDbConnection | $connection | database connection to execute the query |
| mixed | $parameter | The object used to set the parameters in the SQL. |
| TList | $result | A list to populate the result with. |
| integer | $skip | The number of rows to skip over. |
| integer | $max | The maximum number of rows to return. |
| Output |
|
TList
| A TList of result objects. |
| Exception |
|
executeQueryForMap
| public TMap executeQueryForMap |
(IDbConnection $connection , mixed $parameter , string $keyProperty , string $valueProperty ) |
Executes the SQL and retuns all rows selected in a map that is keyed on
the property named in the <tt>$keyProperty</tt> parameter. The value at each key will be the value of the property specified in the <tt>$valueProperty</tt> parameter. If <tt>$valueProperty</tt> is <tt>null</tt>, the entire result object will be entered.
| Input |
| IDbConnection | $connection | database connection to execute the query |
| mixed | $parameter | The object used to set the parameters in the SQL. |
| string | $keyProperty | The property of the result object to be used as the key. |
| string | $valueProperty | The property of the result object to be used as the value (or null) |
| Output |
|
TMap
| A map of object containing the rows keyed by <tt>$keyProperty</tt>. |
| Exception |
|
executeQueryForObject
| public object result. executeQueryForObject |
(IDbConnection $connection , mixed $parameter , object The $result ) |
Executes an SQL statement that returns a single row as an object of the type of the <tt>$result</tt> passed in as a parameter.
| Input |
| IDbConnection | $connection | database connection to execute the query |
| mixed | $parameter | The object used to set the parameters in the SQL. |
| object The | $result | result object. |
| Output |
| Exception |
|
executeUpdate
| public integer executeUpdate |
(IDbConnection $connection , mixed $parameter ) |
Execute an update statement. Also used for delete statement. Return the number of row effected.
| Input |
| IDbConnection | $connection | database connection to execute the query |
| mixed | $parameter | The object used to set the parameters in the SQL. |
| Output |
|
integer
| The number of row effected. |
| Exception |
|
getID
| Output |
|
string
| Name used to identify the MappedStatement amongst the others. |
| Exception |
|
getManager
| public TSqlMap getManager |
() |
| Output |
|
TSqlMap
| The TSqlMap used by this TMappedStatement |
| Exception |
|
getStatement
| Output |
|
TSqlMapStatement
| The SQL statment used by this TMappedStatement. |
| Exception |
|
|