DboOracle Class Info:
- Class Declaration:
class DboOracle extends DboSource
- File name:
- cake/libs/model/datasources/dbo/dbo_oracle.php
- Description:
Oracle layer for DBO.
Long description for class
- Class Inheritance
- Package
- cake
- Subpackage
- cake.cake.libs.model.datasources.dbo
Properties:
-
affected string
String to hold how many rows were affected by the last SQL operation.
-
alias string
Alias
-
_baseConfig array
Base configuration settings for MySQL driver
-
__bypass boolean
Bypass automatic adding of joined fields/associations.
-
cacheMethods boolean.
Whether or not to cache the results of DboSource::name() and DboSource::conditions() into the memory cache. Set to false to disable the use of the memory cache.
-
cacheSources boolean
Whether or not source data like available tables and schema descriptions should be cached
-
columns array
Column definitions
-
_commands array
Index of basic SQL commands
-
config array
Configuration options
-
configKeyName string
The DataSource configuration key name
-
connected boolean
Are we connected to the DataSource?
-
connection mixed
Connection object
-
_currentRow mixed
Current Row
-
description string
Description string for this Database Data Source.
-
__descriptions array
Holds references to descriptions loaded by the DataSource
-
endQuote string
The ending character that this DataSource uses for quoted identifiers.
-
error unknown_type
Error description of last query
-
_error unknown_type
Last error issued by oci extension
-
fieldParameters array
List of engine specific additional field parameters used on table creating
-
fullDebug boolean
Print full query debug info?
-
index array
index definition, standard cake, primary, index, unique
-
_limit int
Query limit
-
_map unknown_type
Enter description here...
-
methodCache array
Caches result from query parsing operations
-
numRows int
Number of rows in current resultset
-
_numRows int
Number of rows
-
_offset int
Query offset
-
_queriesCnt int
Queries count.
-
_queriesLog unknown_type
Log of queries executed by this DataSource
-
_queriesLogMax int Maximum number of queries in the queries log.
Maximum number of items in query log
This is to prevent query log taking over too much memory.
-
_queriesTime unknown_type
Total duration of all queries.
-
_queryCache array Maximum number of queries in the queries log.
Caches serialzed results of executed queries
-
_result array
Result
-
_results mixed
Query results
-
_sequenceMap unknown_type
Table-sequence map
-
_sequences
Sequence names as introspected from the database
-
_sources array
Holds a list of sources (tables) contained in the DataSource
-
__sqlOps array
The set of valid SQL operations usable in a WHERE statement
-
startQuote string
The starting character that this DataSource uses for quoted identifiers.
-
tableParameters array
List of table engine specific parameters used on table creating
-
took int
Time the last query took
-
__transactionStarted boolean
Transaction in progress flag
-
_transactionStarted boolean
Whether or not this DataSource is in the middle of a transaction
-
virtualFieldSeparator string
Separator string for virtualField composition
Method Summary:
- alterSchema( $compare, $table = NULL )
- begin( )
- boolean( $data )
- buildColumn( $column )
- _buildFieldParameters( $columnString, $columnData, $position )
- buildIndex( $indexes, $table = NULL )
- buildJoinStatement( $join )
- buildStatement( $query, $model )
- buildTableParameters( $parameters, $table = NULL )
- __cacheDescription( $object, $data = NULL )
- cacheMethod( $method, $key, $value = NULL )
- cakeError( $method, $messages = array ( ) )
- calculate( $model, $func, $params = array ( ) )
- close( )
- column( $real )
- commit( )
- conditionKeysToString( $conditions, $quoteValues = true, $model = NULL )
- conditions( $conditions, $quoteValues = true, $where = true, $model = NULL )
- connect( )
- constraint( $action, $table )
- __construct( $config = NULL, $autoConnect = true )
- _constructVirtualFields( $model, $alias, $fields )
- create( $model, $fields = NULL, $values = NULL )
- createSchema( $schema, $tableName = NULL )
- createSequence( $sequence )
- createTrigger( $table )
- defaultConditions( $model, $conditions, $useAlias = true )
- delete( $model, $conditions = NULL )
- describe( $model )
- __destruct( )
- disconnect( )
- dispatchMethod( $method, $params = array ( ) )
- dropSchema( $schema, $table = NULL )
- enabled( )
- _execute( $sql )
- execute( $sql, $options = array ( ) )
- expression( $expression )
- fetchAll( $sql, $cache = true, $modelName = NULL )
- fetchAssociated( $model, $query, $ids )
- fetchResult( )
- fetchRow( )
- fetchVirtualField( $result )
- field( $name, $sql )
- fields( $model, $alias = NULL, $fields = array ( ), $quote = true )
- __filterResults( $results, $model, $filtered = array ( ) )
- flushMethodCache( )
- fullTableName( $model, $quote = true )
- generateAssociationQuery( $model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet )
- getConstraint( $type, $model, $linkModel, $alias, $assoc, $alias2 = NULL )
- getEncoding( )
- _getJoins( $model )
- getLog( $sorted = false, $clear = true )
- group( $group, $model = NULL )
- hasAny( $Model, $sql )
- hasResult( )
- identifier( $identifier )
- index( $model )
- insertMulti( $table, $fields, $values )
- insertQueryData( $query, $data, $association, $assocData, $model, $linkModel, $stack )
- introspectType( $value )
- isConnected( )
- isInterfaceSupported( $interface )
- lastAffected( )
- lastError( )
- lastInsertId( $source )
- lastNumRows( )
- length( $real )
- limit( $limit = -1, $offset = 0 )
- listSources( )
- log( $msg, $type = 2 )
- logQuery( $sql )
- _matchRecords( $model, $conditions = NULL )
- __mergeAssociation( $data, $merge, $association, $type, $selfJoin = false )
- __mergeConditions( $query, $assoc )
- __mergeHasMany( $resultSet, $merge, $association, $model, $linkModel )
- name( $name )
- Object( )
- __openPersistent( $name, $type = NULL )
- order( $keys, $direction = 'ASC', $model = NULL )
- __parseKey( $model, $key, $value )
- _persist( $name, $return, $object, $type = NULL )
- _prepareUpdateFields( $model, $fields, $quoteValues = true, $alias = false )
- query( )
- queryAssociation( $model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet, $recursive, $stack )
- __quoteFields( $conditions )
- __quoteMatchedField( $match )
- rawQuery( $sql )
- read( $model, $queryData = array ( ), $recursive = NULL )
- readTableParameters( $name )
- reconnect( $config = NULL )
- renderJoinStatement( $data )
- renderStatement( $type, $data )
- requestAction( $url, $extra = array ( ) )
- resolveKey( $model, $key, $assoc = NULL )
- rollback( )
- _savePersistent( $name, $object )
- _scrapeSQL( $sql )
- __scrubQueryData( $data )
- sequenceExists( $sequence )
- _set( $properties = array ( ) )
- setConfig( $config = array ( ) )
- setEncoding( $lang )
- _setError( $source = NULL, $clear = false )
- showLog( $sorted = false )
- showQuery( $sql )
- sources( $reset = false )
- _stop( $status = 0 )
- toString( )
- truncate( $table, $reset = 0 )
- update( $model, $fields = array ( ), $values = NULL, $conditions = NULL )
- value( $data, $column = NULL, $safe = false )
alterSchema
topGenerate a Oracle Alter Table syntax for the given Schema comparison
- Parameters:
-
-
$compare required
-
$table optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 698
- Return
unknown
begin
topBegin a transaction
(i.e. if the database/model does not support transactions).
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 770
- Return
boolean True on success, false on fail
boolean
topTranslates between PHP boolean values and Database (faked) boolean values
- Parameters:
-
-
mixed $data required
Value to be translated
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2569
- Return
mixed Converted boolean value
- Access
public
buildColumn
topGenerate a database-native column schema string
- Parameters:
-
-
array $column required
An array structured like the following: array('name'=>'value', 'type'=>'value'[, options]), where options can be 'default', 'length', or 'key'.
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2704
- Return
string
- Access
public
_buildFieldParameters
topBuild the field parameters, in a position
- Parameters:
-
-
string $columnString required
The partially built column string
-
array $columnData required
The array of column data.
-
string $position required
The position type to use. 'beforeDefault' or 'afterDefault' are common
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2770
- Return
string a built column with the field parameters added.
- Access
public
buildIndex
topFormat indexes for create table
- Parameters:
-
-
array $indexes required
-
string $table optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2794
- Return
array
- Access
public
buildJoinStatement
topBuilds and generates a JOIN statement from an array. Handles final clean-up before conversion.
- Parameters:
-
-
array $join required
An array defining a JOIN statement in a query
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1410
- Return
string An SQL JOIN statement to be used in a query
- Access
public
- See
buildStatement
topBuilds and generates an SQL statement from an array. Handles final clean-up before conversion.
- Parameters:
-
-
array $query required
An array defining an SQL query
-
object $model required
The model object which initiated the query
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1436
- Return
string An executable SQL statement
- Access
public
- See
buildTableParameters
topFormat parameters for create table
- Parameters:
-
-
array $parameters required
-
string $table optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2846
- Return
array
- Access
public
__cacheDescription
topCache the DataSource description
- Parameters:
-
-
string $object required
The name of the object (model) to cache
-
mixed $data optional NULL
The description of the model, usually a string or array
-
- Method defined in:
- cake/libs/model/datasources/datasource.php on line 466
- Return
mixed
- Access
private
cacheMethod
topCache a value into the methodCaches. Will respect the value of DboSource::$cacheMethods. Will retrieve a value from the cache if $value is null.
If caching is disabled and a write is attempted, the $value will be returned. A read will either return the value or null.
- Parameters:
-
-
string $method required
Name of the method being cached.
-
string $key required
The keyname for the cache operation.
-
mixed $value optional NULL
The value to cache into memory.
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 501
- Return
mixed Either null on failure, or the value if its set.
cakeError
topUsed 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:
-
-
string $method required
Method to be called in the error class (AppError or ErrorHandler classes)
-
array $messages optional array ( )
Message that is to be displayed by the error class
-
- Method defined in:
- cake/libs/object.php on line 187
- Return
error message
- Access
public
calculate
topReturns an SQL calculation, i.e. COUNT() or MAX()
- Parameters:
-
-
model $model required
-
string $func required
Lowercase name of SQL function, i.e. 'count' or 'max'
-
array $params optional array ( )
Function parameters (any values must be quoted manually)
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1738
- Return
string An SQL calculation function
- Access
public
close
topDisconnects database, kills the connection and says the connection is closed.
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2474
- Return
void
- Access
public
column
topConverts database-layer column types to basic types
- Parameters:
-
-
string $real required
Real database-layer column type (i.e. "varchar(255)")
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 807
- Return
string Abstract column type (i.e. "string")
- Access
public
commit
topCommit a transaction
(i.e. if the database/model does not support transactions, or a transaction has not started).
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 795
- Return
boolean True on success, false on fail
conditionKeysToString
topCreates a WHERE clause by parsing given conditions array. Used by DboSource::conditions().
- Parameters:
-
-
array $conditions required
Array or string of conditions
-
boolean $quoteValues optional true
If true, values should be quoted
-
Model $model optional NULL
A reference to the Model instance making the query
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2123
- Return
string SQL fragment
- Access
public
conditions
topCreates a WHERE clause by parsing given conditions data. If an array or string conditions are provided those conditions will be parsed and quoted. If a boolean is given it will be integer cast as condition. Null will return 1 = 1.
- Parameters:
-
-
mixed $conditions required
Array or string of conditions, or any value.
-
boolean $quoteValues optional true
If true, values should be quoted
-
boolean $where optional true
If true, "WHERE " will be prepended to the return value
-
Model $model optional NULL
A reference to the Model instance making the query
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2060
- Return
string SQL fragment
- Access
public
connect
topConnects to the database using options in the given configuration array.
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 170
- Return
boolean True if the database could be connected, else false
- Access
public
constraint
topEnables, disables, and lists table constraints
Note: This method could have been written using a subselect for each table, however the effort Oracle expends to run the constraint introspection is very high. Therefore, this method caches the result once and loops through the arrays to find what it needs. It reduced my query time by 50%. YMMV.
- Parameters:
-
-
string $action required
-
string $table required
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 584
- Return
mixed boolean true or array of constraints
__construct
topConstructor
- Parameters:
-
-
array $config optional NULL
Array of configuration information for the Datasource.
-
boolean $autoConnect optional true
Whether or not the datasource should automatically connect.
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 130
- Access
public
_constructVirtualFields
topConverts model virtual fields into sql expressions to be fetched later
- Parameters:
-
-
Model $model required
-
string $alias required
Alias tablename
-
mixed $fields required
virtual fields to be used on query
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1909
- Return
array
create
topThe "C" in CRUD
Creates new records in the database.
- Parameters:
-
-
Model $model required
Model object that the record is for.
-
array $fields optional NULL
An array of field names to insert. If null, $model->data will be used to generate field names.
-
array $values optional NULL
An array of values with keys matching the fields. If null, $model->data will be used to generate values.
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 716
- Return
boolean Success
- Access
public
createSchema
topGenerate a database-native schema for the given Schema object
- Parameters:
-
-
object $schema required
An instance of a subclass of CakeSchema
-
string $tableName optional NULL
Optional. If specified only the table name given will be generated. Otherwise, all tables defined in the schema are generated.
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2619
- Return
string
- Access
public
createSequence
topCreates a database sequence
- Parameters:
-
-
string $sequence required
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 441
- Return
bool
- Access
public
createTrigger
topCreate trigger
- Parameters:
-
-
string $table required
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 453
- Return
mixed
- Access
public
defaultConditions
topCreates a default set of conditions from the model if $conditions is null/empty. If conditions are supplied then they will be returned. If a model doesn't exist and no conditions were provided either null or false will be returned based on what was input.
- Parameters:
-
-
object $model required
-
mixed $conditions required
Array of conditions, conditions string, null or false. If an array of conditions, or string conditions those conditions will be returned. With other values the model's existance will be checked. If the model doesn't exist a null or false will be returned depending on the input value.
-
boolean $useAlias optional true
Use model aliases rather than table names when generating conditions
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1848
- Return
mixed Either null, false, $conditions or an array of default conditions to use.
- See
- Access
public
delete
topGenerates and executes an SQL DELETE statement. For databases that do not support aliases in UPDATE queries.
- Parameters:
-
-
Model $model required
-
mixed $conditions optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1637
- Return
boolean Success
- Access
public
describe
topReturns an array of the fields in given table name.
- Parameters:
-
-
$model required
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 491
- Return
array Fields in table. Keys are name and type
- Access
public
__destruct
topCloses the current datasource.
- Method defined in:
- cake/libs/model/datasources/datasource.php on line 587
- Return
void
- Access
public
disconnect
topDisconnects from database.
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 251
- Return
boolean True if the database could be disconnected, else false
- Access
public
dispatchMethod
topCalls a method on this object with the given parameters. Provides an OO wrapper
for call_user_func_array
- Parameters:
-
-
string $method required
Name of the method to call
-
array $params optional array ( )
Parameter list to use when calling $method
-
- Method defined in:
- cake/libs/object.php on line 107
- Return
mixed Returns the result of the method call
- Access
public
dropSchema
topGenerate a "drop table" statement for the given Schema object
Otherwise, all tables defined in the schema are generated.
- Parameters:
-
-
object $schema required
An instance of a subclass of CakeSchema
-
string $table optional NULL
Optional. If specified only the table name given will be generated.
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 1145
- Return
string
enabled
topCheck whether the conditions for the Datasource being available are satisfied. Often used from connect() to check for support before establishing a connection.
- Method defined in:
- cake/libs/model/datasources/datasource.php on line 428
- Return
boolean Whether or not the Datasources conditions for use are met.
- Access
public
_execute
topExecutes given SQL statement. This is an overloaded method.
- Parameters:
-
-
string $sql required
SQL statement
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 339
- Return
resource Result resource identifier or null
- Access
protected
execute
topQueries the database with given SQL statement, and obtains some metadata about the result (rows affected, timing, any errors, number of rows in resultset). The query is also logged. If Configure::read('debug') is set, the log is shown all the time, else it is only shown on errors.
Options
- stats - Collect meta data stats for this query. Stats include time take, rows affected,
any errors, and number of rows returned. Defaults to
true. - log - Whether or not the query should be logged to the memory log.
- Parameters:
-
-
string $sql required
-
array $options optional array ( )
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 245
- Return
mixed Resource or object representing the result set, or false on failure
- Access
public
expression
topReturns an object to represent a database expression in a query
- Parameters:
-
-
string $expression required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 210
- Return
object An object representing a database expression to be used in a query
- Access
public
fetchAll
topReturns an array of all result rows for a given SQL query. Returns false if no rows matched.
- Parameters:
-
-
string $sql required
SQL statement
-
boolean $cache optional true
Enables returning/storing cached query results
-
$modelName optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 400
- Return
array Array of resultset rows, or false if no rows matched
- Access
public
fetchAssociated
topA more efficient way to fetch associations. Woohoo!
- Parameters:
-
-
model $model required
Primary model object
-
string $query required
Association query
-
array $ids required
Array of IDs of associated records
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1060
- Return
array Association results
- Access
public
fetchResult
topFetches the next row from the current result set
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 415
- Return
unknown
fetchRow
topFetch result row
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 386
- Return
array
- Access
public
fetchVirtualField
topModifies $result array to place virtual fields in model entry where they belongs to
- Parameters:
-
-
$result required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 439
- Return
void
field
topReturns a single field of the first of query results for a given SQL query, or false if empty.
- Parameters:
-
-
string $name required
Name of the field
-
string $sql required
SQL query
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 470
- Return
mixed Value of field read.
- Access
public
fields
topGenerates the fields list of an SQL query.
- Parameters:
-
-
Model $model required
-
string $alias optional NULL
Alias tablename
-
mixed $fields optional array ( )
Alias tablename
-
boolean $quote optional true
If false, returns fields array unquoted
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1929
- Return
array
- Access
public
__filterResults
topPasses association results thru afterFind filters of corresponding model
- Parameters:
-
-
array $results required
Reference of resultset to be filtered
-
object $model required
Instance of model to operate against
-
array $filtered optional array ( )
List of classes already filtered, to be skipped
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 861
- Return
array Array of results that have been filtered through $model->afterFind
- Access
private
flushMethodCache
topEmpties the method caches. These caches are used by DboSource::name() and DboSource::conditions()
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 485
- Return
void
fullTableName
topGets full table name including prefix
- Parameters:
-
-
mixed $model required
Either a Model object or a string table name.
-
boolean $quote optional true
Whether you want the table name quoted.
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 689
- Return
string Full quoted table name
- Access
public
generateAssociationQuery
topGenerates an array representing a query or part of a query from a single model or two associated models
- Parameters:
-
-
Model $model required
-
Model $linkModel required
-
string $type required
-
string $association required
-
array $assocData required
-
array $queryData required
-
boolean $external required
-
array $resultSet required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1202
- Return
mixed
- Access
public
getConstraint
topReturns a conditions array for the constraint between two models
- Parameters:
-
-
string $type required
Association type
-
object $model required
Model object
-
$linkModel required
-
$alias required
-
$assoc required
-
$alias2 optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1368
- Return
array Conditions array defining the constraint between $model and $association
- Access
public
getEncoding
topGets the current encoding language
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 233
- Return
string language constant
_getJoins
topReturns an array of SQL JOIN fragments from a model's associations
- Parameters:
-
-
object $model required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1708
- Return
array
- Access
protected
getLog
topGet the query log as an array.
- Parameters:
-
-
boolean $sorted optional false
Get the queries sorted by time taken, defaults to false.
-
$clear optional true
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 596
- Return
array Array of queries run as an array
- Access
public
group
topCreate a GROUP BY SQL clause
- Parameters:
-
-
string $group required
Group By Condition
-
$model optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2452
- Return
mixed string condition or null
- Access
public
hasAny
topChecks if the specified table contains any record matching specified SQL
- Parameters:
-
-
$Model required
-
string $sql required
SQL WHERE clause (condition only, not the "WHERE" part)
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2486
- Return
boolean True if the table has a matching record, else false
- Access
public
hasResult
topChecks if the result is valid
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 585
- Return
boolean True if the result is valid else false
- Access
public
identifier
topReturns an object to represent a database identifier in a query
- Parameters:
-
-
string $identifier required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 196
- Return
object An object representing a database identifier to be used in a query
- Access
public
index
topReturns an array of the indexes in given table name.
- Parameters:
-
-
string $model required
Name of model to inspect
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 656
- Return
array Fields in table. Keys are column and unique
insertMulti
topInserts multiple values into a table
- Parameters:
-
-
string $table required
-
string $fields required
-
array $values required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2588
- Access
protected
insertQueryData
topReplaces {$cakeID$} and {$cakeForeignKey$} placeholders in query data.
- Parameters:
-
-
string $query required
Query string needing replacements done.
-
array $data required
Array of data with values that will be inserted in placeholders.
-
string $association required
Name of association model being replaced
-
unknown_type $assocData required
Name of association model being replaced
-
Model $model required
Instance of the model to replace $cakeID$
-
Model $linkModel required
Instance of model to replace $cakeForeignKey$
-
array $stack required
Instance of model to replace $cakeForeignKey$
-
- Method defined in:
- cake/libs/model/datasources/datasource.php on line 500
- Return
string String of query data with placeholders replaced.
- Access
public
- Todo
Remove and refactor $assocData, ensure uses of the method have the param removed too.
introspectType
topGuesses the data type of an array
- Parameters:
-
-
string $value required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2866
- Return
void
- Access
public
isConnected
topChecks if the source is connected to the database.
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 575
- Return
boolean True if the database is connected, else false
- Access
public
isInterfaceSupported
topReturns true if the DataSource supports the given interface (method)
- Parameters:
-
-
string $interface required
The name of the interface (method)
-
- Method defined in:
- cake/libs/model/datasources/datasource.php on line 438
- Return
boolean True on success
- Access
public
lastAffected
topReturns number of affected rows in previous database operation. If no previous operation exists, this returns false.
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 929
- Return
int Number of affected rows
- Access
public
lastError
topReturns a formatted error message from previous database operation.
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 919
- Return
string Error message with error number
- Access
public
lastInsertId
topReturns the ID generated from the previous INSERT operation.
- Parameters:
-
-
$source required
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 899
- Return
integer
- Access
public
lastNumRows
topReturns number of rows in previous resultset. If no previous resultset exists, this returns false.
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 328
- Return
integer Number of rows in resultset
- Access
public
length
topGets the length of a database-native column description, or null if no length
- Parameters:
-
-
string $real required
Real database-layer column type (i.e. "varchar(255)")
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2508
- Return
mixed An integer or string representing the length of the column
- Access
public
limit
topModify a SQL query to limit (and offset) the result set
- Parameters:
-
-
integer $limit optional -1
Maximum number of rows to return
-
integer $offset optional 0
Row to begin returning
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 316
- Return
modified SQL Query
- Access
public
listSources
topReturns an array of tables in the database. If there are no tables, an error is raised and the application exits.
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 465
- Return
array tablenames in the database
- Access
public
log
topConvience method to write a message to CakeLog. See CakeLog::write() for more information on writing to logs.
- Parameters:
-
-
string $msg required
Log message
-
integer $type optional 2
Error type constant. Defined in app/config/core.php.
-
- Method defined in:
- cake/libs/object.php on line 148
- Return
boolean Success of log write
- Access
public
logQuery
topLog given SQL query.
- Parameters:
-
-
string $sql required
SQL statement
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 640
- Todo
: Add hook to log errors instead of returning false
- Access
public
_matchRecords
topGets 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
-
mixed $conditions optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1662
- Return
array List of record IDs
- Access
protected
__mergeAssociation
topEnter description here...
- Parameters:
-
-
unknown_type $data required
-
unknown_type $merge required
-
unknown_type $association required
-
unknown_type $type required
-
boolean $selfJoin optional false
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1118
- Access
private
__mergeConditions
topMerges a mixed set of string/array conditions
- Parameters:
-
-
$query required
-
$assoc required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1525
- Return
array
- Access
private
__mergeHasMany
topmergeHasMany - Merge the results of hasMany relations.
- Parameters:
-
-
array $resultSet required
Data to merge into
-
array $merge required
Data to merge
-
string $association required
Name of Model being Merged
-
object $model required
Model being merged onto
-
object $linkModel required
Model being merged
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1079
- Return
void
name
topThis method should quote Oracle identifiers. Well it doesn't. It would break all scaffolding and all of Cake's default assumptions.
- Parameters:
-
-
$name required
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 749
- Return
unknown
- Access
public
Object
topA 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:
- cake/libs/object.php on line 43
- Return
Object
__openPersistent
topOpen the persistent class file for reading Used by Object::_persist()
- Parameters:
-
-
string $name required
Name of persisted class
-
string $type optional NULL
Type of persistance (e.g: registry)
-
- Method defined in:
- cake/libs/object.php on line 268
- Return
void
- Access
private
order
topReturns an ORDER BY clause as a string.
- Parameters:
-
-
$keys required
-
string $direction optional 'ASC'
Direction (ASC or DESC)
-
object $model optional NULL
model reference (used to look for virtual field)
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2385
- Return
string ORDER BY clause
- Access
public
__parseKey
topExtracts a Model.field identifier and an SQL condition operator from a string, formats and inserts values, and composes them into an SQL snippet.
- Parameters:
-
-
Model $model required
Model object initiating the query
-
string $key required
An SQL key snippet containing a field and optional SQL operator
-
mixed $value required
The value(s) to be inserted in the string
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2230
- Return
string
- Access
private
_persist
topChecks 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:
-
-
string $name required
name of the class to persist
-
$return required
-
string $object required
the object to persist
-
$type optional NULL
-
- Method defined in:
- cake/libs/object.php on line 218
- Return
boolean Success
- Access
protected
- Todo
add examples to manual
_prepareUpdateFields
topQuotes and prepares fields and values for an SQL UPDATE statement
- Parameters:
-
-
Model $model required
-
array $fields required
-
boolean $quoteValues optional true
If values should be quoted, or treated as SQL snippets
-
boolean $alias optional false
Include the model alias in the field name
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1593
- Return
array Fields and values, quoted and preparted
- Access
protected
query
topDataSource Query abstraction
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 275
- Return
resource Result resource identifier.
- Access
public
queryAssociation
topEnter description here...
- Parameters:
-
-
Model $model required
-
unknown_type $linkModel required
-
string $type required
Association type
-
unknown_type $association required
Association type
-
unknown_type $assocData required
Association type
-
unknown_type $queryData required
Association type
-
unknown_type $external required
Association type
-
unknown_type $resultSet required
Association type
-
integer $recursive required
Number of levels of association
-
array $stack required
Number of levels of association
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 993
__quoteFields
topQuotes Model.fields
- Parameters:
-
-
string $conditions required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2318
- Return
string or false if no match
- Access
private
__quoteMatchedField
topAuxiliary function to quote matches Model.fields from a preg_replace_callback call
- Parameters:
-
-
$match required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2344
- Return
string quoted strig
- Access
private
rawQuery
topExecutes given SQL statement.
- Parameters:
-
-
string $sql required
SQL statement
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 224
- Return
boolean
- Access
public
read
topThe "R" in CRUD
Reads record(s) from the database.
- Parameters:
-
-
Model $model required
A Model object that the query is for.
-
array $queryData optional array ( )
An array of queryData information containing keys similar to Model::find()
-
integer $recursive optional NULL
Number of levels of association
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 764
- Return
mixed boolean false on error/failure. An array of results on success.
readTableParameters
topRead additional table parameters
- Parameters:
-
-
$name required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 2825
- Return
array
- Access
public
reconnect
topReconnects to database server with optional new settings
- Parameters:
-
-
array $config optional NULL
An array defining the new configuration settings
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 153
- Return
boolean True on success, false on failure
- Access
public
renderJoinStatement
topRenders a final SQL JOIN statement
- Parameters:
-
-
array $data required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1465
- Return
string
- Access
public
renderStatement
topRenders a final SQL statement by putting together the component parts in the correct order
- Parameters:
-
-
string $type required
-
array $data required
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 940
- Return
string
requestAction
topCalls a controller's method from any location. Can be used to connect controllers together or tie plugins into a main application. requestAction can be used to return rendered views or fetch the return value from controller actions.
- Parameters:
-
-
mixed $url required
String or array-based url.
-
array $extra optional array ( )
if array includes the key "return" it sets the AutoRender to true.
-
- Method defined in:
- cake/libs/object.php on line 80
- Return
mixed Boolean true or false on success/failure, or contents of rendered action if 'return' is set in $extra.
- Access
public
resolveKey
topReturns a key formatted like a string Model.fieldname(i.e. Post.title, or Country.name)
- Parameters:
-
-
unknown_type $model required
-
unknown_type $key required
-
unknown_type $assoc optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1875
- Return
string
- Access
public
rollback
topRollback a transaction
(i.e. if the database/model does not support transactions, or a transaction has not started).
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 783
- Return
boolean True on success, false on fail
_savePersistent
topYou should choose a unique name for the persistent file
There are many uses for this method, see manual for examples
- Parameters:
-
-
string $name required
name used for object to cache
-
object $object required
the object to persist
-
- Method defined in:
- cake/libs/object.php on line 247
- Return
boolean true on save, throws error if file can not be created
- Access
protected
_scrapeSQL
topScrape the incoming SQL to create the association map. This is an extremely experimental method that creates the association maps since Oracle will not tell us.
- Parameters:
-
-
string $sql required
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 266
- Return
false if sql is nor a SELECT
- Access
protected
__scrubQueryData
topPrivate helper method to remove query metadata in given data array.
- Parameters:
-
-
array $data required
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1892
- Return
array
- Access
public
sequenceExists
topChecks to see if a named sequence exists
- Parameters:
-
-
string $sequence required
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 426
- Return
bool
- Access
public
_set
topAllows setting of multiple properties of the object in a single line of code. Will only set properties that are part of a class declaration.
- Parameters:
-
-
array $properties optional array ( )
An associative array containing properties and corresponding values.
-
- Method defined in:
- cake/libs/object.php on line 166
- Return
void
- Access
protected
setConfig
topSets the configuration for the DataSource. Merges the $config information with the _baseConfig and the existing $config property.
- Parameters:
-
-
array $config optional array ( )
The configuration array
-
- Method defined in:
- cake/libs/model/datasources/datasource.php on line 454
- Return
void
- Access
public
setEncoding
topSets the encoding language of the session
- Parameters:
-
-
string $lang required
language constant
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 221
- Return
bool
_setError
topKeeps track of the most recent Oracle error
- Parameters:
-
-
$source optional NULL
-
$clear optional false
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 203
showLog
topOutputs the contents of the queries log. If in a non-CLI environment the sql_log element will be rendered and output. If in a CLI environment, a plain text log is generated.
- Parameters:
-
-
boolean $sorted optional false
Get the queries sorted by time taken, defaults to false.
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 615
- Return
void
showQuery
topOutput 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:
-
-
string $sql required
Query to show information on.
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 665
- Access
public
sources
topConvenience method for DboSource::listSources(). Returns source names in lowercase.
- Parameters:
-
-
boolean $reset optional false
Whether or not the source list should be reset.
-
- Method defined in:
- cake/libs/model/datasources/datasource.php on line 255
- Return
array Array of sources available in this datasource
- Access
public
_stop
topStop execution of the current script. Wraps exit() making testing easier.
- Parameters:
-
-
$status optional 0
-
- Method defined in:
- cake/libs/object.php on line 135
- Return
void
- Access
public
toString
topObject-to-string conversion. Each class can override this method as necessary.
- Method defined in:
- cake/libs/object.php on line 64
- Return
string The name of this class
- Access
public
truncate
topDeletes all the records in a table and drops all associated auto-increment sequences. Using DELETE instead of TRUNCATE because it causes locking problems.
and if 1, sequences are not modified
- Parameters:
-
-
mixed $table required
A string or model class representing the table to be truncated
-
integer $reset optional 0
If -1, sequences are dropped, if 0 (default), sequences are reset,
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 537
- Return
boolean SQL TRUNCATE TABLE statement, false if not applicable.
- Access
public
update
topGenerates and executes an SQL UPDATE statement for given model, fields, and values. For databases that do not support aliases in UPDATE queries.
- Parameters:
-
-
Model $model required
-
array $fields optional array ( )
-
array $values optional NULL
-
mixed $conditions optional NULL
-
- Method defined in:
- cake/libs/model/datasources/dbo_source.php on line 1558
- Return
boolean Success
- Access
public
value
topReturns a quoted and escaped string of $data for use in an SQL statement.
- Parameters:
-
-
string $data required
String to be prepared for use in an SQL statement
-
$column optional NULL
-
$safe optional false
-
- Method defined in:
- cake/libs/model/datasources/dbo/dbo_oracle.php on line 858
- Return
string Quoted and escaped
- Access
public
