DataSource Class Reference

Public Member Functions | |
| begin (&$model) | |
| column ($real) | |
| commit (&$model) | |
| create (&$model, $fields=null, $values=null) | |
| delete (&$model, $id=null) | |
| describe ($model) | |
| insertQueryData ($query, $data, $association, $assocData, &$model, &$linkModel, $stack) | |
| isInterfaceSupported ($interface) | |
| lastAffected ($source=null) | |
| lastInsertId ($source=null) | |
| lastNumRows ($source=null) | |
| listSources ($data=null) | |
| read (&$model, $queryData=array()) | |
| resolveKey ($model, $key) | |
| rollback (&$model) | |
| setConfig ($config) | |
| sources () | |
| update (&$model, $fields=null, $values=null) | |
Public Attributes | |
| $_baseConfig = array() | |
| $_queriesCnt = 0 | |
| $_queriesLog = array() | |
| $_queriesLogMax = 200 | |
| $_queriesTime = null | |
| $_queryCache = array() | |
| $_result = null | |
| $_sources = null | |
| $_transactionStarted = false | |
| $affected = null | |
| $cacheSources = true | |
| $config = array() | |
| $configKeyName = null | |
| $connected = false | |
| $connection = null | |
| $error = null | |
| $fullDebug = false | |
| $numRows = null | |
| $took = null | |
Detailed Description
Definition at line 37 of file datasource.php.
Member Function Documentation
| DataSource::begin | ( | &$ | model | ) |
| DataSource::column | ( | $ | real | ) |
Converts column types to basic types
- Parameters:
-
string $real Real column type (i.e. "varchar(255)")
- Returns:
- string Abstract column type (i.e. "string")
Reimplemented in DboAdodb, DboDb2, DboFirebird, DboMssql, DboMysql, DboMysqli, DboOdbc, DboOracle, DboPostgres, DboSqlite, and DboSybase.
Definition at line 279 of file datasource.php.
| DataSource::commit | ( | &$ | model | ) |
| DataSource::create | ( | &$ | model, | |
| $ | fields = null, |
|||
| $ | values = null | |||
| ) |
To-be-overridden in subclasses.
- Parameters:
-
unknown_type $model unknown_type $fields unknown_type $values
- Returns:
- unknown
Reimplemented in DboMssql, and DboSource.
Definition at line 290 of file datasource.php.
| DataSource::delete | ( | &$ | model, | |
| $ | id = null | |||
| ) |
To-be-overridden in subclasses.
- Parameters:
-
unknown_type $model unknown_type $id
Reimplemented in DboMysql, and DboSource.
Definition at line 320 of file datasource.php.
| DataSource::describe | ( | $ | model | ) |
Returns a Model description (metadata) or null if none found.
- Parameters:
-
Model $model
- Returns:
- mixed
Definition at line 234 of file datasource.php.
| DataSource::insertQueryData | ( | $ | query, | |
| $ | data, | |||
| $ | association, | |||
| $ | assocData, | |||
| &$ | model, | |||
| &$ | linkModel, | |||
| $ | stack | |||
| ) |
Enter description here...
- Parameters:
-
unknown_type $query unknown_type $data unknown_type $association unknown_type $assocData Model $model Model $linkModel array $stack
- Returns:
- unknown
Definition at line 420 of file datasource.php.
Referenced by DboOracle::queryAssociation().
| DataSource::isInterfaceSupported | ( | $ | interface | ) |
Returns true if the DataSource supports the given interface (method)
- Parameters:
-
string $interface The name of the interface (method)
- Returns:
- boolean True on success
Definition at line 358 of file datasource.php.
| DataSource::lastAffected | ( | $ | source = null |
) |
Returns the ID generated from the previous INSERT operation.
- Parameters:
-
unknown_type $source
- Returns:
- in
Definition at line 349 of file datasource.php.
Referenced by DboSource::execute().
| DataSource::lastInsertId | ( | $ | source = null |
) |
Returns the ID generated from the previous INSERT operation.
- Parameters:
-
unknown_type $source
- Returns:
- in
Reimplemented in DboDb2, DboMssql, DboMysql, DboMysqli, DboOdbc, DboOracle, and DboSybase.
Definition at line 331 of file datasource.php.
Referenced by DboSource::create().
| DataSource::lastNumRows | ( | $ | source = null |
) |
Returns the ID generated from the previous INSERT operation.
- Parameters:
-
unknown_type $source
- Returns:
- in
Definition at line 340 of file datasource.php.
Referenced by DboSource::execute().
| DataSource::listSources | ( | $ | data = null |
) |
Caches/returns cached results for child instances
- Returns:
- array
Definition at line 194 of file datasource.php.
References config(), ConnectionManager::getSourceName(), Cache::read(), Configure::read(), Inflector::slug(), and Cache::write().
Referenced by sources().
| DataSource::read | ( | &$ | model, | |
| $ | queryData = array() | |||
| ) |
To-be-overridden in subclasses.
- Parameters:
-
unknown_type $model unknown_type $queryData
- Returns:
- unknown
Definition at line 300 of file datasource.php.
| DataSource::resolveKey | ( | $ | model, | |
| $ | key | |||
| ) |
To-be-overridden in subclasses.
- Parameters:
-
unknown_type $model unknown_type $key
- Returns:
- unknown
Definition at line 495 of file datasource.php.
| DataSource::rollback | ( | &$ | model | ) |
| DataSource::setConfig | ( | $ | config | ) |
Sets the configuration for the DataSource
- Parameters:
-
array $config The configuration array
Definition at line 370 of file datasource.php.
| DataSource::sources | ( | ) |
Convenience method for DboSource::listSources(). Returns source names in lowercase.
- Returns:
- array
Definition at line 224 of file datasource.php.
References listSources().
| DataSource::update | ( | &$ | model, | |
| $ | fields = null, |
|||
| $ | values = null | |||
| ) |
To-be-overridden in subclasses.
- Parameters:
-
unknown_type $model unknown_type $fields unknown_type $values
- Returns:
- unknown
Reimplemented in DboDb2, and DboFirebird.
Definition at line 311 of file datasource.php.
Member Data Documentation
| DataSource::$_baseConfig = array() |
Reimplemented in DboDb2, DboFirebird, DboMssql, DboMysql, DboMysqli, DboOdbc, DboOracle, DboPostgres, DboSqlite, and DboSybase.
Definition at line 130 of file datasource.php.
| DataSource::$_queriesCnt = 0 |
Definition at line 93 of file datasource.php.
| DataSource::$_queriesLog = array() |
Definition at line 107 of file datasource.php.
| DataSource::$_queriesLogMax = 200 |
Definition at line 116 of file datasource.php.
| DataSource::$_queriesTime = null |
Definition at line 100 of file datasource.php.
| DataSource::$_queryCache = array() |
Definition at line 123 of file datasource.php.
| DataSource::$_result = null |
Definition at line 86 of file datasource.php.
| DataSource::$_sources = null |
Definition at line 144 of file datasource.php.
| DataSource::$_transactionStarted = false |
Definition at line 172 of file datasource.php.
| DataSource::$affected = null |
Definition at line 65 of file datasource.php.
| DataSource::$cacheSources = true |
Definition at line 179 of file datasource.php.
| DataSource::$config = array() |
Reimplemented in DboOracle.
Definition at line 158 of file datasource.php.
Referenced by DboSybase::connect(), DboSqlite::connect(), DboPostgres::connect(), DboOdbc::connect(), DboMysqli::connect(), DboMysql::connect(), DboMssql::connect(), DboFirebird::connect(), DboDb2::connect(), DboAdodb::connect(), DboSource::reconnect(), and setConfig().
| DataSource::$configKeyName = null |
Definition at line 165 of file datasource.php.
| DataSource::$connected = false |
Definition at line 44 of file datasource.php.
| DataSource::$connection = null |
| DataSource::$error = null |
Definition at line 58 of file datasource.php.
Referenced by DboSqlite::lastError(), DboMssql::lastError(), DboFirebird::lastError(), and DboSource::showQuery().
| DataSource::$fullDebug = false |
Definition at line 51 of file datasource.php.
| DataSource::$numRows = null |
Definition at line 72 of file datasource.php.
| DataSource::$took = null |
Definition at line 79 of file datasource.php.
The documentation for this class was generated from the following file:
- 1.2.x.x/cake/libs/model/datasources/datasource.php