Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
DALOracleConverter Class Reference
Inheritance diagram for DALOracleConverter:
DALConverter

Public Member Functions

 __construct ()
 
 convertCreateTable (array $table)
 
 handleFunctionTableExists ($tableName, $schema=NULL)
 
 handleFunctionSequenceExists ($sequenceName)
 
 convertDropTable ($tableName, $cascade=FALSE)
 
- Public Member Functions inherited from DALConverter
 getDataType ($type)
 
 getName ()
 
 getConstructName ($name)
 
 convertToSql (array $sqlArray)
 
 convertCreateTable (array $table)
 
 convertDropTable ($tableName, $cascade=FALSE)
 
 convertTruncateTable ($tableName)
 
 convertDropSequence ($sequenceName)
 
 convertResetSequence ($sequenceName)
 
 handleFunctionTableExists ($tableName, $schema=NULL)
 

Protected Member Functions

 convertSingleCreateColumn (array $col)
 
 handleFunctionSeqNextVal ($seqName)
 
 handleFunctionSeqCurrVal ($seqName)
 
 handleFunctionToDate (array $args)
 
 convertWithQuery (array $withQuery)
 
 convertSelectQuery (array $sqlArray, $level=0, array $ignore=array())
 
 convertTableAlias ($alias)
 
 convertUnionsInFromClause (array $union, $level=0)
 
 convertLimit (array $limit)
 
 convertSelectFieldList (array $fields, $level=1)
 
 addSqlFilters (array $sqlArray)
 
 handleFunctionSubstring (array $args)
 
- Protected Member Functions inherited from DALConverter
 convertSelectQuery (array $sqlArray, $level=0, array $ignore=array())
 
 addSqlFilters (array $sqlArray)
 
 convertSelectFieldList (array $fields, $level=1)
 
 convertSingleField ($field)
 
 getSelectFieldName (array $field)
 
 setSelectFieldAlias (array $field, $alias)
 
 getSelectFieldNames (array $fields)
 
 convertField (array $field)
 
 convertSingleValue ($field)
 
 convertSingleFunction (array $function)
 
 convertFromList (array $from, $level=1)
 
 convertTableAlias ($alias)
 
 convertMathOperation (array $mathOp)
 
 separateFields (array $fields)
 
 separateTables (array $tables)
 
 convertWhereClause (array $where, $level=0, $addBrackets=TRUE)
 
 convertInCondition (array $in, $level=0, $type='IN')
 
 convertExistsCondition (array $exists, $level=0, $type='EXISTS')
 
 convertIsNull (array $isNull)
 
 convertNotNull (array $notNull)
 
 convertUnionsInFromClause (array $union, $level=0)
 
 getUnionType (array $union)
 
 convertUnions (array $union, $level=1)
 
 convertUnionDisplayName ($type)
 
 convertGroupBy (array $groupBy)
 
 convertOrderBy (array $orderBy)
 
 convertLimit (array $limit)
 
 convertJoins (array $joins)
 
 convertSingleJoin (array $join)
 
 convertInsertQuery (array $sqlArray)
 
 addSpaces ($level=0, $spaces=4)
 
 convertInsertQueryFields (array $fields)
 
 convertInsertQueryValues (array $insert)
 
 convertUpdateQuery (array $sqlArray)
 
 convertUpdateQuerySetValues (array $values)
 
 convertDeleteQuery (array $sqlArray)
 
 convertAlterQueryHeader ($tableName)
 
 convertAlterQuery (array $sqlArray)
 
 convertAlterQueryAddColumn (array $addColumn)
 
 convertAlterQueryDropColumn ($column)
 
 convertAlterQueryRenameColumn (array $renameColumn)
 
 convertAlterQueryModifyColumn (array $modifyColumns)
 
 convertAlterQueryAddConstraint (array $constraints, $tableName=NULL)
 
 convertAlterQueryDropConstraint ($dropConstraint)
 
 convertAlterQueryRenameTable (array $renameTable)
 
 convertCreateHeader (array $table)
 
 convertCreateFooter (array $table)
 
 convertCreateColumns (array $table)
 
 convertSingleCreateColumn (array $col)
 
 convertConstraints (array $constraintsList, $asArray=FALSE)
 
 convertSinglePrimaryKey (array $pk)
 
 convertSingleForeignKey (array $fk)
 
 convertSingleUnique (array $un)
 
 convertCreateIndexes (array $table)
 
 convertSingleIndex (array $idx, $tableName)
 
 convertCreateSequences (array $sequences)
 
 convertSingleSequence ($sequence)
 
 convertWithQuery (array $withQuery)
 
 convertCallQuery (array $callQuery)
 
 handleFunctionConcat (array $args)
 
 handleFunctionArray (array $args)
 
 convertLikeCondition (array $condition)
 
 handleFunctionCast (array $args)
 
 handleFunctionBindcast (array $args)
 
 handleFunctionLength (array $args)
 
 handleFunctionCoalesce (array $args)
 
 handleFunctionMax (array $args)
 
 handleFunctionMin (array $args)
 
 handleFunctionCount (array $args)
 
 handleFunctionSubstring (array $args)
 
 getComparisonOperators ($type=NULL)
 

Protected Attributes

 $name = 'Oracle'
 
 $dataTypes
 
- Protected Attributes inherited from DALConverter
 $dataTypes
 
 $sqlConstructs
 
 $mathOps
 
 $query = array()
 
 $name = ''
 

Detailed Description

DALOracleConverter.

Contains methods to perform any database specific conversions into SQL. The methods to convert XML structures into SQL are defined in the parent class "DALConverter", and if any conversions need to be altered for this database the corresponding methods of DALConverter should be redefined here.

Since
4.0.0

Definition at line 25 of file DALOracleConverter.inc.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Since
4.0.0

Definition at line 67 of file DALOracleConverter.inc.

Member Function Documentation

addSqlFilters ( array  $sqlArray)
protected

Returns string with the SQL filters included.

Parameters
array$sqlArrayThe Query array.
Since
4.0.0
Returns
string

Definition at line 439 of file DALOracleConverter.inc.

convertCreateTable ( array  $table)

Converts create statement to SQL string.

Indexes are added after creating the table. Note: Create table may return more than one SQL statement, use split(':', $sql); to get each SQL statament.

Parameters
array$tableCREATE array.
Since
4.0.0
Returns
string

Definition at line 85 of file DALOracleConverter.inc.

convertDropTable (   $tableName,
  $cascade = FALSE 
)

Converts DROP TABLE statement.

Parameters
string$tableNameName of the table to drop from the db.
boolean$cascadeIf TRUE, deletions will be cascaded to dependent objects.
Since
4.0.0
Returns
string

Definition at line 274 of file DALOracleConverter.inc.

convertLimit ( array  $limit)
protected

Converts LIMIT.

Parameters
array$limitSingle LIMIT clause.
Since
4.0.0
Returns
string

Definition at line 373 of file DALOracleConverter.inc.

convertSelectFieldList ( array  $fields,
  $level = 1 
)
protected

Converts Select's field list to its SQL format.

Parameters
array$fieldsArray of fields.
integer$levelNumber of levels to indent.
Since
4.0.0
Returns
string

Definition at line 392 of file DALOracleConverter.inc.

convertSelectQuery ( array  $sqlArray,
  $level = 0,
array  $ignore = array() 
)
protected

Converts Select query to its SQL string.

Parameters
array$sqlArrayThe select query array.
integer$levelNumber of levels to indent.
array$ignoreTag names that will be ignored while converting the select statement. Example: where,join..
Since
4.0.0
Returns
string

Definition at line 297 of file DALOracleConverter.inc.

convertSingleCreateColumn ( array  $col)
protected

Converts single create column to its SQL string.

Single create column consists of column's name, type (size and scale), null/not null, and its default value.

For Postgres SQL will look like: assetid VARCHAR2(15) NOT NULL DEFAUL 1.

Parameters
array$colSingle column in create clause.
Since
4.0.0
Returns
string

Definition at line 119 of file DALOracleConverter.inc.

convertTableAlias (   $alias)
protected

Converts given alias string to table alias.

Parameters
string$aliasTable alias.
Since
4.0.0
Returns
array

Definition at line 338 of file DALOracleConverter.inc.

convertUnionsInFromClause ( array  $union,
  $level = 0 
)
protected

Convert list of union that are in side a FROM clause.

Parameters
array$unionArray of selects in union/union-all.
integer$levelNumber of levels to indent.
Since
4.0.0
Returns
string

Definition at line 354 of file DALOracleConverter.inc.

convertWithQuery ( array  $withQuery)
protected

Converts a WITH query to CONNECT BY PRIOR/START WITH query.

Parameters
array$withQueryArray containing the with query information.
Since
4.0.0
Returns
string

Definition at line 242 of file DALOracleConverter.inc.

handleFunctionSeqCurrVal (   $seqName)
protected

Handles SeqCurrVal(seqName) function.

SeqCurrVal will return the current sequence value.

Parameters
string$seqNameName of the sequence.
Since
4.0.0
Returns
string

Definition at line 165 of file DALOracleConverter.inc.

handleFunctionSeqNextVal (   $seqName)
protected

Handles SeqNextVal(seqName) function.

SewNextVal will increment sequence value and return the new sequence value.

Parameters
string$seqNameName of the sequence.
Since
4.0.0
Returns
string

Definition at line 147 of file DALOracleConverter.inc.

handleFunctionSequenceExists (   $sequenceName)

Handles sequence exists.

Parameters
(array|string)$sequenceName Sequence name.
Since
4.0.0
Returns
string

Definition at line 202 of file DALOracleConverter.inc.

handleFunctionSubstring ( array  $args)
protected

Handles the SUBSTRING() function.

Oracle doesn't provide the standard SUBSTRING function, It provides SUBSTR(input,start-pos[,length]) instead.

Parameters
array$argsMethod arguments.
Since
4.0.0
Returns
string

Definition at line 491 of file DALOracleConverter.inc.

handleFunctionTableExists (   $tableName,
  $schema = NULL 
)

Handles table exists.

Parameters
(array|string)$tableName Table name argument.
string$schemaThe schema to check the table for.
Since
4.0.0
Returns
string

Definition at line 182 of file DALOracleConverter.inc.

handleFunctionToDate ( array  $args)
protected

Handles a custom DAL ToDate() function call.

This function will convert an ISO8601 date into a format suitable for insertion into a query.

Parameters
array$argsThe arguments of the function.
Since
4.0.0
Returns
string

Definition at line 225 of file DALOracleConverter.inc.

Field Documentation

$dataTypes
protected
Initial value:
= array(
'char' => 'CHAR',
'varchar' => 'VARCHAR2',
'clob' => 'CLOB',
'blob' => 'BLOB',
'integer' => 'INT',
'smallint' => 'SMALLINT',
'numeric' => 'NUMERIC',
'float' => 'FLOAT',
'real' => 'REAL',
'double_precision' => 'DOUBLE PRECISION',
'boolean' => 'CHAR(1)',
'date' => 'DATE',
'time' => 'TIMESTAMP',
'timestamp' => 'TIMESTAMP',
'interval' => '',
'time with time zone' => 'TIMESTAMP',
)

Definition at line 42 of file DALOracleConverter.inc.


The documentation for this class was generated from the following file: