DboSqlite Class Info:

Class Declaration:
class DboSqlite extends DboSource
File name:
cake/libs/model/datasources/dbo/dbo_sqlite.php
Summary:
DBO implementation for the SQLite DBMS. Long description for class
Class Inheritance

DboSource DataSource Object

Properties:

Show/Hide parent properties
public affected String to hold how many rows were affected by the last SQL operation.
public alias Database keyword used to assign aliases to identifiers.
public _baseConfig Base configuration settings for SQLite driver
public __bypass Bypass automatic adding of joined fields/associations.
public cacheSources Whether or not source data like available tables and schema descriptions should be cached
public columns SQLite column definition
protected _commands Index of basic SQL commands
public config The DataSource configuration
public configKeyName The DataSource configuration key name
public connected Are we connected to the DataSource?
public connection A reference to the physical connection of this DataSource
public description Enter description here...
public endQuote Closing quote for quoted identifiers
public error Error description of last query
public fieldCache Caches fields quoted in DboSource::name()
public fullDebug Print full query debug info?
public index index definition, standard cake, primary, index, unique
protected _log Log object
public numRows Number of rows in current resultset
protected _queriesCnt Queries count.
protected _queriesLog Log of queries executed by this DataSource
protected _queriesLogMax Maximum number of items in query log, to prevent query log taking over too much memory on large amounts of queries -- I we've had problems at >6000 queries on one system.
protected _queriesTime Total duration of all queries.
protected _queryCache Caches serialzed results of executed queries
protected _queryStats Keeps the transaction statistics of CREATE/UPDATE/DELETE queries
protected _result Enter description here...
protected _sources Holds a list of sources (tables) contained in the DataSource
public __sqlOps The set of valid SQL operations usable in a WHERE statement
public startQuote Opening quote for quoted identifiers
public took Time the last query took
protected _transactionStarted Whether or not this DataSource is in the middle of a transaction

Method Summary:

Show/Hide parent methods
public alterSchema( $compare, $table = NULL )
public begin( $model )
public boolean( $data )
public buildColumn( $column )
public buildIndex( $indexes, $table = NULL )
public buildJoinStatement( $join )
public buildStatement( $query, $model )
public __cacheDescription( $object, $data = NULL )
public cakeError( $method, $messages = array ( ) )
public calculate( $model, $func, $params = array ( ) )
public close( )
public column( $real )
public commit( $model )
public conditionKeysToString( $conditions, $quoteValues = true, $model = NULL )
public conditions( $conditions, $quoteValues = true, $where = true, $model = NULL )
public connect( )
public __construct( $config = NULL, $autoConnect = true )
public create( $model, $fields = NULL, $values = NULL )
public createSchema( $schema, $tableName = NULL )
public defaultConditions( $model, $conditions, $useAlias = true )
public delete( $model, $conditions = NULL )
public describe( $model )
public __destruct( )
public disconnect( )
public dispatchMethod( $method, $params = array ( ) )
public dropSchema( $schema, $table = NULL )
public _execute( $sql )
public execute( $sql )
public expression( $expression )
public fetchAll( $sql, $cache = true, $modelName = NULL )
public fetchAssociated( $model, $query, $ids )
public fetchResult( )
public fetchRow( $sql = NULL )
public field( $name, $sql )
public fields( $model, $alias = NULL, $fields = array ( ), $quote = true )
public __filterResults( $results, $model, $filtered = array ( ) )
public fullTableName( $model, $quote = true )
public generateAssociationQuery( $model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet )
public getConstraint( $type, $model, $linkModel, $alias, $assoc, $alias2 = NULL )
public getEncoding( )
public _getJoins( $model )
public group( $group )
public hasAny( $Model, $sql )
public hasResult( )
public identifier( $identifier )
public index( $model )
protected insertMulti( $table, $fields, $values )
public insertQueryData( $query, $data, $association, $assocData, $model, $linkModel, $stack )
public introspectType( $value )
public isConnected( )
public isInterfaceSupported( $interface )
public lastAffected( )
public lastError( )
public lastInsertId( )
public lastNumRows( )
public length( $real )
public limit( $limit, $offset = NULL )
public listSources( )
public log( $msg, $type = 2 )
public logQuery( $sql )
protected _matchRecords( $model, $conditions = NULL )
public __mergeAssociation( $data, $merge, $association, $type, $selfJoin = false )
public __mergeConditions( $query, $assoc )
public __mergeHasMany( $resultSet, $merge, $association, $model, $linkModel )
public name( $data )
public Object( )
public order( $keys, $direction = 'ASC' )
protected _persist( $name, $return, $object, $type = NULL )
protected _prepareUpdateFields( $model, $fields, $quoteValues = true, $alias = false )
public query( )
public queryAssociation( $model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet, $recursive, $stack )
public rawQuery( $sql )
public read( $model, $queryData = array ( ), $recursive = NULL )
public reconnect( $config = NULL )
public renderJoinStatement( $data )
public renderStatement( $type, $data )
public requestAction( $url, $extra = array ( ) )
public resolveKey( $model, $key, $assoc = NULL )
public resultSet( $results )
public rollback( $model )
protected _savePersistent( $name, $object )
public __scrubQueryData( $data )
protected _set( $properties = array ( ) )
public setConfig( $config = array ( ) )
public setEncoding( $enc )
public showLog( $sorted = false )
public showQuery( $sql )
public sources( $reset = false )
public _stop( $status = 0 )
public toString( )
public truncate( $table )
public update( $model, $fields = array ( ), $values = NULL, $conditions = NULL )
public value( $data, $column = NULL, $safe = false )

alterSchema

top
Generate a alter syntax from CakeSchema::compare()
Parameters:
$compare required (no default)
$table optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2292
return
unknown

begin

top
Begin a transaction (i.e. if the database/model does not support transactions, or a transaction has not started).
Parameters:
$model model required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1566
return
boolean True on success, false on fail

boolean

top
Translates between PHP boolean values and Database (faked) boolean values
Parameters:
$data mixed Value to be translated required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2201
return
mixed Converted boolean value

buildColumn

top
Generate a database-native column schema string
Parameters:
$column array An array structured like the following: array('name'=>'value', 'type'=>'value'[, options]), where options can be 'default', 'length', or 'key'. required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 437
return
string

buildIndex

top
Removes redundant primary key indexes, as they are handled in the column def of the key.
Parameters:
$indexes array required (no default)
$table string optional NULL
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 510
return
string

buildJoinStatement

top
Builds and generates a JOIN statement from an array. Handles final clean-up before conversion.
Parameters:
$join array An array defining a JOIN statement in a query required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1236
return
string An SQL JOIN statement to be used in a query
see
DboSource::renderJoinStatement()
DboSource::buildStatement()

buildStatement

top
Builds and generates an SQL statement from an array. Handles final clean-up before conversion.
Parameters:
$query array An array defining an SQL query required (no default)
$model object The model object which initiated the query required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1260
return
string An executable SQL statement
see
DboSource::renderStatement()

__cacheDescription

top
Cache the DataSource description
Parameters:
$object string The name of the object (model) to cache required (no default)
$data mixed The description of the model, usually a string or array optional NULL
Method defined in class:
DataSource
Method defined in file:
cake/libs/model/datasources/datasource.php on line 387

cakeError

top
Used to report user friendly errors. If there is a file app/error.php or app/app_error.php this file will be loaded error.php is the AppError class it should extend ErrorHandler class.
Parameters:
$method string Method to be called in the error class (AppError or ErrorHandler classes) required (no default)
$messages array Message that is to be displayed by the error class optional array ( )
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 189
return
error message
access
public

calculate

top
Returns an SQL calculation, i.e. COUNT() or MAX()
Parameters:
$model model required (no default)
$func string Lowercase name of SQL function, i.e. 'count' or 'max' required (no default)
$params array Function parameters (any values must be quoted manually) optional array ( )
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1526
return
string An SQL calculation function
access
public

close

top
Disconnects database, kills the connection and says the connection is closed, and if DEBUG is turned on, the log for this object is shown.
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2109

column

top
Converts database-layer column types to basic types
Parameters:
$real string Real database-layer column type (i.e. "varchar(255)") required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 333
return
string Abstract column type (i.e. "string")

commit

top
Commit a transaction (i.e. if the database/model does not support transactions, or a transaction has not started).
Parameters:
$model model required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1581
return
boolean True on success, false on fail

conditionKeysToString

top
Creates a WHERE clause by parsing given conditions array. Used by DboSource::conditions().
Parameters:
$conditions array Array or string of conditions required (no default)
$quoteValues boolean If true, values should be quoted optional true
$model Model A reference to the Model instance making the query optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1784
return
string SQL fragment

conditions

top
Creates a WHERE clause by parsing given conditions data.
Parameters:
$conditions mixed Array or string of conditions required (no default)
$quoteValues boolean If true, values should be quoted optional true
$where boolean If true, "WHERE " will be prepended to the return value optional true
$model Model A reference to the Model instance making the query optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1745
return
string SQL fragment

connect

top
Connects to the database using config['database'] as a filename.
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 106
return
mixed

__construct

top
Constructor
Parameters:
$config optional NULL
$autoConnect optional true
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 88

create

top
The "C" in CRUD
Parameters:
$model Model required (no default)
$fields array optional NULL
$values array optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 559
return
boolean Success

createSchema

top
Generate a database-native schema for the given Schema object
Parameters:
$schema object An instance of a subclass of CakeSchema required (no default)
$tableName string Optional. If specified only the table name given will be generated. Otherwise, all tables defined in the schema are generated. optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2246
return
string

defaultConditions

top
Creates a default set of conditions from the model if $conditions is null/empty.
Parameters:
$model object required (no default)
$conditions mixed required (no default)
$useAlias boolean Use model aliases rather than table names when generating conditions optional true
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1611
return
mixed

delete

top
Generates and executes an SQL DELETE statement. For databases that do not support aliases in UPDATE queries.
Parameters:
$model Model required (no default)
$conditions mixed optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1447
return
boolean Success

describe

top
Returns an array of the fields in given table name.
Parameters:
$model required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 183
return
array Fields in table. Keys are name and type

__destruct

top
Closes the current datasource.
Method defined in class:
DataSource
Method defined in file:
cake/libs/model/datasources/datasource.php on line 500

disconnect

top
Disconnects from database.
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 121
return
boolean True if the database could be disconnected, else false

dispatchMethod

top
Calls a method on this object with the given parameters. Provides an OO wrapper for call_user_func_array, and improves performance by using straight method calls in most cases.
Parameters:
$method string Name of the method to call required (no default)
$params array Parameter list to use when calling $method optional array ( )
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 113
return
mixed Returns the result of the method call
access
public

dropSchema

top
Generate a "drop table" statement for the given Schema object
Parameters:
$schema object An instance of a subclass of CakeSchema required (no default)
$table string Optional. If specified only the table name given will be generated. Otherwise, all tables defined in the schema are generated. optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2303
return
string

_execute

top
Executes given SQL statement.
Parameters:
$sql string SQL statement required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 132
return
resource Result resource identifier

execute

top
Overrides DboSource::execute() to correctly handle query statistics
Parameters:
$sql string required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 147
return
unknown

expression

top
Returns an object to represent a database expression in a query
Parameters:
$expression string required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 158
return
object An object representing a database expression to be used in a query

fetchAll

top
Returns an array of all result rows for a given SQL query. Returns false if no rows matched.
Parameters:
$sql string SQL statement required (no default)
$cache boolean Enables returning/storing cached query results optional true
$modelName optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 329
return
array Array of resultset rows, or false if no rows matched

fetchAssociated

top
A more efficient way to fetch associations. Woohoo!
Parameters:
$model model Primary model object required (no default)
$query string Association query required (no default)
$ids array Array of IDs of associated records required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 894
return
array Association results

fetchResult

top
Fetches the next row from the current result set
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 390
return
unknown

fetchRow

top
Returns a row from current resultset as an array
Parameters:
$sql optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 306
return
array The fetched row as an array

field

top
Returns a single field of the first of query results for a given SQL query, or false if empty.
Parameters:
$name string Name of the field required (no default)
$sql string SQL query required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 365
return
unknown

fields

top
Generates the fields list of an SQL query.
Parameters:
$model Model required (no default)
$alias string Alias tablename optional NULL
$fields mixed Alias tablename optional array ( )
$quote boolean If false, returns fields array unquoted optional true
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1665
return
array

__filterResults

top
Private method. Passes association results thru afterFind filters of corresponding model
Parameters:
$results array Reference of resultset to be filtered required (no default)
$model object Instance of model to operate against required (no default)
$filtered array List of classes already filtered, to be skipped optional array ( )
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 699
return
return

fullTableName

top
Gets full table name including prefix
Parameters:
$model mixed required (no default)
$quote boolean optional true
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 538
return
string Full quoted table name

generateAssociationQuery

top
Generates an array representing a query or part of a query from a single model or two associated models
Parameters:
$model Model required (no default)
$linkModel Model required (no default)
$type string required (no default)
$association string required (no default)
$assocData array required (no default)
$queryData array required (no default)
$external boolean required (no default)
$resultSet array required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1032
return
mixed

getConstraint

top
Returns a conditions array for the constraint between two models
Parameters:
$type string Association type required (no default)
$model object Model object required (no default)
$linkModel required (no default)
$alias required (no default)
$assoc required (no default)
$alias2 optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1196
return
array Conditions array defining the constraint between $model and $association

getEncoding

top
Gets the database encoding
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 500
return
string The database encoding

_getJoins

top
Returns an array of SQL JOIN fragments from a model's associations
Parameters:
$model object required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1497
return
array

group

top
Create a GROUP BY SQL clause
Parameters:
$group string Group By Condition required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2095
return
mixed string condition or null

hasAny

top
Checks if the specified table contains any record matching specified SQL
Parameters:
$Model required (no default)
$sql string SQL WHERE clause (condition only, not the "WHERE" part) required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2122
return
boolean True if the table has a matching record, else false

hasResult

top
Checks if the result is valid
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 452
return
boolean True if the result is valid else false

identifier

top
Returns an object to represent a database identifier in a query
Parameters:
$identifier string required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 146
return
object An object representing a database identifier to be used in a query

index

top
Overrides DboSource::index to handle SQLite indexe introspection Returns an array of the indexes in given table name.
Parameters:
$model string Name of model to inspect required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 540
return
array Fields in table. Keys are column and unique

insertMulti

top
Inserts multiple values into a table
Parameters:
$table string required (no default)
$fields string required (no default)
$values array required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2219
access
protected

insertQueryData

top
Enter description here...
Parameters:
$query unknown_type required (no default)
$data unknown_type required (no default)
$association unknown_type required (no default)
$assocData unknown_type required (no default)
$model Model required (no default)
$linkModel Model required (no default)
$stack array required (no default)
Method defined in class:
DataSource
Method defined in file:
cake/libs/model/datasources/datasource.php on line 418
return
unknown

introspectType

top
Guesses the data type of an array
Parameters:
$value string required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2409
return
void
access
public

isConnected

top
Checks if it's connected to the database
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 444
return
boolean True if the database is connected, else false

isInterfaceSupported

top
Returns true if the DataSource supports the given interface (method)
Parameters:
$interface string The name of the interface (method) required (no default)
Method defined in class:
DataSource
Method defined in file:
cake/libs/model/datasources/datasource.php on line 365
return
boolean True on success

lastAffected

top
Returns number of affected rows in previous database operation. If no previous operation exists, this returns false.
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 297
return
integer Number of affected rows

lastError

top
Returns a formatted error message from previous database operation.
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 285
return
string Error message

lastInsertId

top
Returns the ID generated from the previous INSERT operation.
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 324
return
int

lastNumRows

top
Returns number of rows in previous resultset. If no previous resultset exists, this returns false.
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 313
return
integer Number of rows in resultset

length

top
Gets the length of a database-native column description, or null if no length
Parameters:
$real string Real database-layer column type (i.e. "varchar(255)") required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2142
return
mixed An integer or string representing the length of the column

limit

top
Returns a limit statement in the correct format for the particular database.
Parameters:
$limit integer Limit of results returned required (no default)
$offset integer Offset from which to start results optional NULL
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 416
return
string SQL limit/offset statement

listSources

top
Returns an array of tables in the database. If there are no tables, an error is raised and the application exits.
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 157
return
array Array of tablenames in the database

log

top
API for logging events.
Parameters:
$msg string Log message required (no default)
$type integer Error type constant. Defined in app/config/core.php. optional 2
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 150
return
boolean Success of log write
access
public

logQuery

top
Log given SQL query.
Parameters:
$sql string SQL statement required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 493
todo
: Add hook to log errors instead of returning false

_matchRecords

top
Gets a list of record IDs for the given conditions. Used for multi-record updates and deletes in databases that do not support aliases in UPDATE/DELETE queries.
Parameters:
$model Model required (no default)
$conditions mixed optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1471
return
array List of record IDs
access
protected

__mergeAssociation

top
Enter description here...
Parameters:
$data unknown_type required (no default)
$merge unknown_type required (no default)
$association unknown_type required (no default)
$type unknown_type required (no default)
$selfJoin boolean optional false
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 950

__mergeConditions

top
Merges a mixed set of string/array conditions
Parameters:
$query required (no default)
$assoc required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1341
return
array

__mergeHasMany

top
mergeHasMany - Merge the results of hasMany relations.
Parameters:
$resultSet array Data to merge into required (no default)
$merge array Data to merge required (no default)
$association string Name of Model being Merged required (no default)
$model object Model being merged onto required (no default)
$linkModel object Model being merged required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 913
return
void

name

top
Returns a quoted name of $data for use in an SQL statement. Strips fields out of SQL functions before quoting.
Parameters:
$data string required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 381
return
string SQL field

Object

top
A hack to support __construct() on PHP 4 Hint: descendant classes have no PHP4 class_name() constructors, so this constructor gets called first and calls the top-layer __construct() which (if present) should call parent::__construct()
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 53
return
Object

order

top
Returns an ORDER BY clause as a string.
Parameters:
$keys required (no default)
$direction string Direction (ASC or DESC) optional 'ASC'
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 2028
return
string ORDER BY clause

_persist

top
Checks for a persistent class file, if found file is opened and true returned If file is not found a file is created and false returned If used in other locations of the model you should choose a unique name for the persistent file There are many uses for this method, see manual for examples
Parameters:
$name string name of the class to persist required (no default)
$return required (no default)
$object string the object to persist required (no default)
$type optional NULL
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 219
return
boolean Success
access
protected
todo
add examples to manual

_prepareUpdateFields

top
Quotes and prepares fields and values for an SQL UPDATE statement
Parameters:
$model Model required (no default)
$fields array required (no default)
$quoteValues boolean If values should be quoted, or treated as SQL snippets optional true
$alias boolean Include the model alias in the field name optional false
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1405
return
array Fields and values, quoted and preparted
access
protected

query

top
DataSource Query abstraction
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 211
return
resource Result resource identifier

queryAssociation

top
Enter description here...
Parameters:
$model Model required (no default)
$linkModel unknown_type required (no default)
$type string Association type required (no default)
$association unknown_type Association type required (no default)
$assocData unknown_type Association type required (no default)
$queryData unknown_type Association type required (no default)
$external unknown_type Association type required (no default)
$resultSet unknown_type Association type required (no default)
$recursive integer Number of levels of association required (no default)
$stack array Number of levels of association required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 741

rawQuery

top
Executes given SQL statement.
Parameters:
$sql string SQL statement required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 170
return
unknown

read

top
The "R" in CRUD
Parameters:
$model Model required (no default)
$queryData array optional array ( )
$recursive integer Number of levels of association optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 604
return
unknown

reconnect

top
Reconnects to database server with optional new settings
Parameters:
$config array An array defining the new configuration settings optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 107
return
boolean True on success, false on failure

renderJoinStatement

top
Renders a final SQL JOIN statement
Parameters:
$data array required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1287
return
string

renderStatement

top
Overrides DboSource::renderStatement to handle schema generation with SQLite-style indexes
Parameters:
$type string required (no default)
$data array required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 577
return
string

requestAction

top
Calls a controller's method from any location.
Parameters:
$url mixed String or array-based url. required (no default)
$extra array if array includes the key "return" it sets the AutoRender to true. optional array ( )
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 86
return
mixed Boolean true or false on success/failure, or contents of rendered action if 'return' is set in $extra.
access
public

resolveKey

top
Returns a key formatted like a string Model.fieldname(i.e. Post.title, or Country.name)
Parameters:
$model unknown_type required (no default)
$key unknown_type required (no default)
$assoc unknown_type optional NULL
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1633
return
string

resultSet

top
Enter description here...
Parameters:
$results unknown_type required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 367

rollback

top
Rollback a transaction (i.e. if the database/model does not support transactions, or a transaction has not started).
Parameters:
$model model required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1596
return
boolean True on success, false on fail

_savePersistent

top
You should choose a unique name for the persistent file There are many uses for this method, see manual for examples
Parameters:
$name string name used for object to cache required (no default)
$object object the object to persist required (no default)
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 247
return
boolean true on save, throws error if file can not be created
access
protected

__scrubQueryData

top
Private helper method to remove query metadata in given data array.
Parameters:
$data array required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 1648
return
array

_set

top
Allows setting of multiple properties of the object in a single line of code.
Parameters:
$properties array An associative array containing properties and corresponding values. optional array ( )
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 169
return
void
access
protected

setConfig

top
Sets the configuration for the DataSource
Parameters:
$config array The configuration array optional array ( )
Method defined in class:
DataSource
Method defined in file:
cake/libs/model/datasources/datasource.php on line 378
return
void

setEncoding

top
Sets the database encoding
Parameters:
$enc string Database encoding required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 489

showLog

top
Outputs the contents of the queries log.
Parameters:
$sorted boolean optional false
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 460

showQuery

top
Output information about an SQL query. The SQL statement, number of rows in resultset, and execution time in microseconds. If the query fails, an error is output instead.
Parameters:
$sql string Query to show information on. required (no default)
Method defined in class:
DboSource
Method defined in file:
cake/libs/model/datasources/dbo_source.php on line 516

sources

top
Convenience method for DboSource::listSources(). Returns source names in lowercase.
Parameters:
$reset optional false
Method defined in class:
DataSource
Method defined in file:
cake/libs/model/datasources/datasource.php on line 228
return
array

_stop

top
Stop execution of the current script
Parameters:
$status optional 0
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 139
return
void
access
public

toString

top
Object-to-string conversion. Each class can override this method as necessary.
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 73
return
string The name of this class
access
public

truncate

top
Deletes all the records in a table and resets the count of the auto-incrementing primary key, where applicable.
Parameters:
$table mixed A string or model class representing the table to be truncated required (no default)
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 277
return
boolean SQL TRUNCATE TABLE statement, false if not applicable.
access
public

update

top
Generates and executes an SQL UPDATE statement for given model, fields, and values.
Parameters:
$model Model required (no default)
$fields array optional array ( )
$values array optional NULL
$conditions mixed optional NULL
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 255
return
array

value

top
Returns a quoted and escaped string of $data for use in an SQL statement.
Parameters:
$data string String to be prepared for use in an SQL statement required (no default)
$column optional NULL
$safe optional false
Method defined in class:
DboSqlite
Method defined in file:
cake/libs/model/datasources/dbo/dbo_sqlite.php on line 219
return
string Quoted and escaped