Detailed Description
Select statement.
Definition at line 23 of file SelectStatement.php.
 Inheritance diagram for SelectStatement:Public Member Functions | |
| __construct (RDBMapper $mapper, $id=self::NO_CACHE) | |
| getType () | |
| isCached () | |
| setMeta ($key, $value) | |
| getMeta ($key) | |
| getRowCount () | |
| save () | |
| assemble ($cacheKey=null) | |
| query ($fetchMode=null, $bind=array()) | |
| __sleep () | |
| __wakeup () | |
Static Public Member Functions | |
| static | get (RDBMapper $mapper, $id=self::NO_CACHE) | 
Public Attributes | |
| const | NO_CACHE = 'no_cache' | 
| const | CACHE_KEY = 'select' | 
Static Protected Member Functions | |
| static | getCacheSection ($type) | 
| static | getCacheId ($id) | 
Protected Attributes | |
| $_id = null | |
| $_type = null | |
| $_meta = array() | |
| $_cachedSql = array() | |
Constructor & Destructor Documentation
| __construct | ( | RDBMapper | $mapper, | 
$id = self::NO_CACHE  | 
        |||
| ) | 
Constructor.
- Parameters
 - 
  
$mapper RDBMapper instance $id The statement id (optional, default: SelectStatement::NO_CACHE)  
Definition at line 58 of file SelectStatement.php.
Member Function Documentation
      
  | 
  static | 
Get the SelectStatement instance with the given id.
If the id equals SelectStatement::NO_CACHE or is not cached, a new one will be created.
- Parameters
 - 
  
$mapper RDBMapper instance used to retrieve the database connection $id The statement id (optional, default: SelectStatement::NO_CACHE)  
- Returns
 - SelectStatement
 
Definition at line 40 of file SelectStatement.php.
| getType | ( | ) | 
Get the entity type associated with the statement.
- Returns
 - String
 
Definition at line 68 of file SelectStatement.php.
| isCached | ( | ) | 
Check if the statement is cached already.
- Returns
 - Boolean
 
Definition at line 76 of file SelectStatement.php.
| setMeta | ( | $key, | |
| $value | |||
| ) | 
| getMeta | ( | $key | ) | 
Get customt meta value.
- Parameters
 - 
  
$key  
- Returns
 - Mixed
 
Definition at line 96 of file SelectStatement.php.
| getRowCount | ( | ) | 
Execute a count query and return the row count.
- Returns
 - Integer
 
Definition at line 107 of file SelectStatement.php.
| save | ( | ) | 
Put the statement into the cache.
Definition at line 137 of file SelectStatement.php.
| assemble | ( | $cacheKey = null | ) | 
- See also
 - Select::assemble()
 
Definition at line 147 of file SelectStatement.php.
| query | ( | $fetchMode = null,  | 
        |
$bind = array()  | 
        |||
| ) | 
- See also
 - Select::query()
 
Definition at line 158 of file SelectStatement.php.
      
  | 
  staticprotected | 
Get the cache section.
- Parameters
 - 
  
$type The type  
- Returns
 - String
 
Definition at line 169 of file SelectStatement.php.
      
  | 
  staticprotected | 
Get the compressed cache id from the id.
- Parameters
 - 
  
$id  
- Returns
 - String
 
Definition at line 178 of file SelectStatement.php.
| __sleep | ( | ) | 
Serialization handlers.
Definition at line 186 of file SelectStatement.php.
| __wakeup | ( | ) | 
Definition at line 190 of file SelectStatement.php.
Member Data Documentation
| const NO_CACHE = 'no_cache' | 
Definition at line 25 of file SelectStatement.php.
| const CACHE_KEY = 'select' | 
Definition at line 26 of file SelectStatement.php.
      
  | 
  protected | 
Definition at line 28 of file SelectStatement.php.
      
  | 
  protected | 
Definition at line 29 of file SelectStatement.php.
      
  | 
  protected | 
Definition at line 30 of file SelectStatement.php.
      
  | 
  protected | 
Definition at line 31 of file SelectStatement.php.