| [ Index ] |
|
Code source de CakePHP 1.1.13.4450 |
[Code source] [Imprimer] [Statistiques]
MS SQL layer for DBO Long description for file
| Copyright: | Copyright 2005-2007, Cake Software Foundation, Inc. |
| License: | http://www.opensource.org/licenses/mit-license.php The MIT License |
| Version: | $Revision: 4450 $ |
| Poids: | 610 lignes (15 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
DboMssql:: (24 méthodes):
__construct()
connect()
disconnect()
_execute()
fetchRow()
listSources()
describe()
name()
value()
fields()
begin()
commit()
rollback()
update()
lastError()
lastAffected()
lastNumRows()
lastInsertId()
limit()
column()
resultSet()
read()
fetchResult()
buildSchemaQuery()
| __construct($config) X-Ref |
| MS SQL DBO driver constructor; sets SQL Server error reporting defaults param: array $config Configuration data from app/config/databases.php return: boolean True if connected successfully, false on error |
| connect() X-Ref |
| Connects to the database using options in the given configuration array. return: boolean True if the database could be connected, else false |
| disconnect() X-Ref |
| Disconnects from database. return: boolean True if the database could be disconnected, else false |
| _execute($sql) X-Ref |
| Executes given SQL statement. param: string $sql SQL statement return: resource Result resource identifier |
| fetchRow($assoc = false) X-Ref |
| Returns a row from given resultset as an array . param: bool $assoc Associative array only, or both? return: array The fetched row as an array |
| listSources() X-Ref |
| Returns an array of sources (tables) in the database. return: array Array of tablenames in the database |
| describe(&$model) X-Ref |
| Returns an array of the fields in given table name. param: Model $model Model object to describe return: array Fields in table. Keys are name and type |
| name($data) X-Ref |
| Returns a quoted name of $data for use in an SQL statement. param: string $data Name (table.field) to be prepared for use in an SQL statement return: string Quoted for MS SQL |
| value($data, $column = null, $safe = false) X-Ref |
| Returns a quoted and escaped string of $data for use in an SQL statement. param: string $data String to be prepared for use in an SQL statement param: string $column The column into which this data will be inserted param: boolean $safe Whether or not numeric data should be handled automagically if no column data is provided return: string Quoted and escaped data |
| fields(&$model, $alias, $fields) X-Ref |
| Generates the fields list of an SQL query. param: Model $model param: string $alias Alias tablename param: mixed $fields return: array |
| begin(&$model) X-Ref |
| Begin a transaction param: unknown_type $model return: boolean True on success, false on fail |
| commit(&$model) X-Ref |
| Commit a transaction param: unknown_type $model return: boolean True on success, false on fail |
| rollback(&$model) X-Ref |
| Rollback a transaction param: unknown_type $model return: boolean True on success, false on fail |
| update(&$model, $fields = array() X-Ref |
| Removes Identity (primary key) column from update data before returning to parent param: Model $model param: array $fields param: array $values return: array |
| lastError() X-Ref |
| Returns a formatted error message from previous database operation. return: string Error message with error number |
| lastAffected() X-Ref |
| Returns number of affected rows in previous database operation. If no previous operation exists, this returns false. return: int Number of affected rows |
| lastNumRows() X-Ref |
| Returns number of rows in previous resultset. If no previous resultset exists, this returns false. return: int Number of rows in resultset |
| lastInsertId($source = null) X-Ref |
| Returns the ID generated from the previous INSERT operation. param: unknown_type $source return: in |
| limit($limit, $offset = null) X-Ref |
| Returns a limit statement in the correct format for the particular database. param: int $limit Limit of results returned param: int $offset Offset from which to start results return: string SQL limit/offset statement |
| column($real) X-Ref |
| Converts database-layer column types to basic types param: string $real Real database-layer column type (i.e. "varchar(255)") return: string Abstract column type (i.e. "string") |
| resultSet(&$results) X-Ref |
| Enter description here... param: unknown_type $results |
| read(&$model, $queryData = array() X-Ref |
| Returns an array of all result rows for a given SQL query. Returns false if no rows matched. param: string $sql SQL statement param: boolean $cache Enables returning/storing cached query results return: array Array of resultset rows, or false if no rows matched |
| fetchResult() X-Ref |
| Fetches the next row from the current result set return: unknown |
| buildSchemaQuery($schema) X-Ref |
| Pas de description |
| Généré le : Sun Feb 25 19:27:47 2007 | par Balluche grâce à PHPXref 0.7 |