Inheritance diagram for DboMssql:

Public Member Functions | |
| __construct ($config, $autoConnect=true) | |
| __mapFields ($sql) | |
| __switchSort ($order) | |
| _execute ($sql) | |
| _getPrimaryKey ($model) | |
| buildColumn ($column) | |
| buildIndex ($indexes, $table=null) | |
| column ($real) | |
| connect () | |
| create (&$model, $fields=null, $values=null) | |
| describe (&$model) | |
| disconnect () | |
| fetchResult () | |
| fields (&$model, $alias=null, $fields=array(), $quote=true) | |
| insertMulti ($table, $fields, $values) | |
| lastAffected () | |
| lastError () | |
| lastInsertId ($source=null) | |
| lastNumRows () | |
| limit ($limit, $offset=null) | |
| listSources () | |
| read (&$model, $queryData=array(), $recursive=null) | |
| renderStatement ($type, $data) | |
| resultSet (&$results) | |
| update (&$model, $fields=array(), $values=null, $conditions=null) | |
| value ($data, $column=null, $safe=false) | |
Public Attributes | |
| $__fieldMappings = array() | |
| $_baseConfig | |
| $_commands | |
| $columns | |
| $description = "MS SQL DBO Driver" | |
| $endQuote = "]" | |
| $startQuote = "[" | |
Definition at line 35 of file dbo_mssql.php.
| DboMssql::__construct | ( | $ | config, | |
| $ | autoConnect = true | |||
| ) |
MS SQL DBO driver constructor; sets SQL Server error reporting defaults
| array | $config Configuration data from app/config/databases.php |
Reimplemented from DboSource.
Definition at line 109 of file dbo_mssql.php.
References DataSource::$config, and __construct().
| DboMssql::__mapFields | ( | $ | sql | ) |
Translates field names used for filtering and sorting to shortened names using the field map
| string | $sql A snippet of SQL representing an ORDER or WHERE statement |
Definition at line 612 of file dbo_mssql.php.
References name().
| DboMssql::__switchSort | ( | $ | order | ) |
Reverses the sort direction of ORDER statements to get paging offsets to work correctly
| string | $order |
Definition at line 600 of file dbo_mssql.php.
| DboMssql::_execute | ( | $ | sql | ) |
Executes given SQL statement.
| string | $sql SQL statement |
Definition at line 172 of file dbo_mssql.php.
Referenced by connect().
| DboMssql::_getPrimaryKey | ( | $ | model | ) |
Makes sure it will return the primary key
| mixed | $model protected |
Definition at line 728 of file dbo_mssql.php.
| DboMssql::buildColumn | ( | $ | column | ) |
Generate a database-native column schema string
| array | $column An array structured like the following: array('name'=>'value', 'type'=>'value'[, options]), where options can be 'default', 'length', or 'key'. |
Reimplemented from DboSource.
Definition at line 685 of file dbo_mssql.php.
References name().
| DboMssql::buildIndex | ( | $ | indexes, | |
| $ | table = null | |||
| ) |
Format indexes for create table
| array | $indexes | |
| string | $table |
Reimplemented from DboSource.
Definition at line 701 of file dbo_mssql.php.
| DboMssql::column | ( | $ | real | ) |
Converts database-layer column types to basic types
| string | $real Real database-layer column type (i.e. "varchar(255)") |
Reimplemented from DataSource.
Definition at line 474 of file dbo_mssql.php.
References name().
Referenced by describe().
| DboMssql::connect | ( | ) |
Connects to the database using options in the given configuration array.
Definition at line 124 of file dbo_mssql.php.
References DataSource::$config, _execute(), config(), and env().
| DboMssql::create | ( | &$ | model, | |
| $ | fields = null, |
|||
| $ | values = null | |||
| ) |
Generates and executes an SQL INSERT statement for given model, fields, and values. Removes Identity (primary key) column from update data before returning to parent, if value is empty.
| Model | $model | |
| array | $fields | |
| array | $values | |
| mixed | $conditions |
Reimplemented from DboSource.
Definition at line 357 of file dbo_mssql.php.
References create().
| DboMssql::describe | ( | &$ | model | ) |
Returns an array of the fields in given table name.
Definition at line 207 of file dbo_mssql.php.
References DataSource::__cacheDescription(), column(), DboSource::fetchAll(), DboSource::fullTableName(), DboSource::length(), and value().
| DboMssql::disconnect | ( | ) |
Disconnects from database.
Definition at line 160 of file dbo_mssql.php.
| DboMssql::fetchResult | ( | ) |
Fetches the next row from the current result set
Definition at line 640 of file dbo_mssql.php.
| DboMssql::fields | ( | &$ | model, | |
| $ | alias = null, |
|||
| $ | fields = array(), |
|||
| $ | quote = true | |||
| ) |
Generates the fields list of an SQL query.
| Model | $model | |
| string | $alias Alias tablename | |
| mixed | $fields |
Reimplemented from DboSource.
Definition at line 292 of file dbo_mssql.php.
References DboSource::$alias, __(), and DboSource::name().
| DboMssql::insertMulti | ( | $ | table, | |
| $ | fields, | |||
| $ | values | |||
| ) |
Inserts multiple values into a table
| string | $table | |
| string | $fields | |
| array | $values protected |
Reimplemented from DboSource.
Definition at line 663 of file dbo_mssql.php.
| DboMssql::lastAffected | ( | ) |
Returns number of affected rows in previous database operation. If no previous operation exists, this returns false.
Definition at line 419 of file dbo_mssql.php.
| DboMssql::lastError | ( | ) |
Returns a formatted error message from previous database operation.
Definition at line 403 of file dbo_mssql.php.
References a().
| DboMssql::lastInsertId | ( | $ | source = null |
) |
Returns the ID generated from the previous INSERT operation.
| unknown_type | $source |
Reimplemented from DataSource.
Definition at line 443 of file dbo_mssql.php.
References $id.
| DboMssql::lastNumRows | ( | ) |
Returns number of rows in previous resultset. If no previous resultset exists, this returns false.
Definition at line 431 of file dbo_mssql.php.
| DboMssql::limit | ( | $ | limit, | |
| $ | offset = null | |||
| ) |
Returns a limit statement in the correct format for the particular database.
| integer | $limit Limit of results returned | |
| integer | $offset Offset from which to start results |
Reimplemented from DboSource.
Definition at line 454 of file dbo_mssql.php.
| DboMssql::listSources | ( | ) |
Returns an array of sources (tables) in the database.
Definition at line 180 of file dbo_mssql.php.
References DboSource::fetchAll().
| DboMssql::read | ( | &$ | model, | |
| $ | queryData = array(), |
|||
| $ | recursive = null | |||
| ) |
Returns an array of all result rows for a given SQL query. Returns false if no rows matched.
| string | $sql SQL statement | |
| boolean | $cache Enables returning/storing cached query results |
Reimplemented from DboSource.
Definition at line 630 of file dbo_mssql.php.
References read().
| DboMssql::renderStatement | ( | $ | type, | |
| $ | data | |||
| ) |
Builds final SQL statement
| string | $type Query type | |
| array | $data Query data |
Reimplemented from DboSource.
Definition at line 549 of file dbo_mssql.php.
References offset().
| DboMssql::resultSet | ( | &$ | results | ) |
Enter description here...
| unknown_type | $results |
Definition at line 517 of file dbo_mssql.php.
References __().
| DboMssql::update | ( | &$ | model, | |
| $ | fields = array(), |
|||
| $ | values = null, |
|||
| $ | conditions = null | |||
| ) |
Generates and executes an SQL UPDATE statement for given model, fields, and values. Removes Identity (primary key) column from update data before returning to parent.
| Model | $model | |
| array | $fields | |
| array | $values | |
| mixed | $conditions |
Reimplemented from DboSource.
Definition at line 386 of file dbo_mssql.php.
| DboMssql::value | ( | $ | data, | |
| $ | column = null, |
|||
| $ | safe = false | |||
| ) |
Returns a quoted and escaped string of $data for use in an SQL statement.
| string | $data String to be prepared for use in an SQL statement | |
| string | $column The column into which this data will be inserted | |
| boolean | $safe Whether or not numeric data should be handled automagically if no column data is provided |
Reimplemented from DboSource.
Definition at line 253 of file dbo_mssql.php.
References DboSource::boolean().
Referenced by describe().
| DboMssql::$__fieldMappings = array() |
Definition at line 60 of file dbo_mssql.php.
| DboMssql::$_baseConfig |
Initial value:
array(
'persistent' => true,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'cake',
'port' => '1433',
)
Reimplemented from DataSource.
Definition at line 66 of file dbo_mssql.php.
| DboMssql::$_commands |
| DboMssql::$columns |
Initial value:
array(
'primary_key' => array('name' => 'IDENTITY (1, 1) NOT NULL'),
'string' => array('name' => 'varchar', 'limit' => '255'),
'text' => array('name' => 'text'),
'integer' => array('name' => 'int', 'formatter' => 'intval'),
'float' => array('name' => 'numeric', 'formatter' => 'floatval'),
'datetime' => array('name' => 'datetime', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
'timestamp' => array('name' => 'timestamp', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
'time' => array('name' => 'datetime', 'format' => 'H:i:s', 'formatter' => 'date'),
'date' => array('name' => 'datetime', 'format' => 'Y-m-d', 'formatter' => 'date'),
'binary' => array('name' => 'image'),
'boolean' => array('name' => 'bit')
)
Definition at line 79 of file dbo_mssql.php.
| DboMssql::$description = "MS SQL DBO Driver" |
| DboMssql::$endQuote = "]" |
| DboMssql::$startQuote = "[" |
1.4.7