TSqlMapStatement class corresponds to <statement> element.
Mapped Statements can hold any SQL statement and can use Parameter Maps and Result Maps for input and output.
The <statement> element is a general "catch all" element that can be used for any type of SQL statement. Generally it is a good idea to use one of the more specific statement-type elements. The more specific elements provided better error-checking and even more functionality. (For example, the insert statement can return a database-generated key.)
Method Summary |
protected
mixed
|
Create a new instance of a given type.
|
ArrayAccess
|
|
mixed
|
Create a new instance of result class.
|
TSqlMapCacheModel
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
TStaticSql
|
|
void
|
|
TParameterMap
|
|
TResultMap
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
An ArrayAccess class can be specified to handle the type of objects in the collection.
|
void
|
If a ParameterMap property is not specified, you may specify a ParameterClass instead and use inline parameters.
|
void
|
A Parameter Map defines an ordered list of values that match up with the "?" placeholders of a standard, parameterized query statement.
|
void
|
If a ResultMap is not specified, you may specify a
|
void
|
A Result Map lets you control how data is extracted from the result of a query, and how the columns are mapped to object properties.
|
void
|
|
Method Details |
createInstanceOf
Create a new instance of a given type.
Input |
TSqlMapTypeHandlerRegistry | $registry | type handler registry |
string | $type | result class name. |
array | $row | result data. |
Output |
mixed
| result object. |
Exception |
|
createInstanceOfListClass
|
createInstanceOfResultClass
Create a new instance of result class.
|
getCache
|
getCacheModel
public string getCacheModel |
() |
Output |
string
| cache mode name. |
Exception |
|
getExtends
public string getExtends |
() |
Output |
string
| another statement element name. |
Exception |
|
getID
Output |
string
| name for this statement, unique to each sql map manager. |
Exception |
|
getListClass
public string getListClass |
() |
Output |
string
| name of a PHP class that implements ArrayAccess. |
Exception |
|
getParameterClass
public string getParameterClass |
() |
Output |
string
| parameter class name. |
Exception |
|
getParameterMap
public string getParameterMap |
() |
Output |
string
| name of a parameter map. |
Exception |
|
getResultClass
public string getResultClass |
() |
Output |
string
| result class name. |
Exception |
|
getResultMap
public string getResultMap |
() |
Output |
string
| result map name. |
Exception |
|
getSqlText
|
initialize
Input |
TSqlMapManager | $manager | initialize the statement, sets the result and parameter maps. |
Output |
Exception |
|
parameterMap
Output |
TParameterMap
| the parameter map corresponding to the ParameterMap property. |
Exception |
|
resultMap
Output |
TResultMap
| the result map corresponding to the ResultMap property. |
Exception |
|
setCache
Input |
TSqlMapCacheModel | $value | cache implementation instance for this statement. |
Output |
Exception |
|
setCacheModel
public void setCacheModel |
(string $value ) |
Input |
string | $value | cache mode name. |
Output |
Exception |
|
setExtends
public void setExtends |
(string $value ) |
Input |
string | $value | name of another statement element to extend. |
Output |
Exception |
|
setID
public void setID |
(string $value ) |
Input |
string | $value | name for this statement, which must be unique for each sql map manager. |
Output |
Exception |
|
setInlineParameterMap
public void setInlineParameterMap |
(TInlineParameterMap $map ) |
Input |
TInlineParameterMap | $map | parameter extracted from the sql text. |
Output |
Exception |
|
setListClass
public void setListClass |
(string $value ) |
An ArrayAccess class can be specified to handle the type of objects in the collection.
Input |
string | $value | name of a PHP class that implements ArrayAccess. |
Output |
Exception |
|
setParameterClass
public void setParameterClass |
(string $value ) |
If a ParameterMap property is not specified, you may specify a ParameterClass instead and use inline parameters.
The value of the parameterClass attribute can be any existing PHP class name.
Input |
string | $value | parameter class name. |
Output |
Exception |
|
setParameterMap
public void setParameterMap |
(string $value ) |
A Parameter Map defines an ordered list of values that match up with the "?" placeholders of a standard, parameterized query statement.
Input |
string | $value | parameter map name. |
Output |
Exception |
|
setResultClass
public void setResultClass |
(string $value ) |
If a ResultMap is not specified, you may specify a
ResultClass instead. The value of the ResultClass property can be the name of a PHP class or primitives like integer, string, or array. The class specified will be automatically mapped to the columns in the result, based on the result metadata.
Input |
string | $value | result class name. |
Output |
Exception |
|
setResultMap
public void setResultMap |
(string $value ) |
A Result Map lets you control how data is extracted from the result of a query, and how the columns are mapped to object properties.
Input |
string | $value | result map name. |
Output |
Exception |
|
setSqlText
Input |
TStaticSql | $value | sql text container. |
Output |
Exception |
|