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

Public Member Functions

 __construct ()
 
 convertCreateTable (array $table)
 
 handleFunctionSequenceExists ($sequenceName)
 
 handleFunctionTableExists ($tableName, $schema=NULL)
 
- 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

 convertCreateIndexes (array $table)
 
 convertSingleIndex (array $idx, $tableName)
 
 handleFunctionSeqNextVal (array $seqName)
 
 handleFunctionSeqCurrVal (array $seqName)
 
 handleFunctionConcat (array $args)
 
 handleFunctionToDate (array $args)
 
 convertCallQuery (array $callQuery)
 
- 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 = 'Postgres'
 
- Protected Attributes inherited from DALConverter
 $dataTypes
 
 $sqlConstructs
 
 $mathOps
 
 $query = array()
 
 $name = ''
 

Detailed Description

DALPostgresConverter.

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 DALPostgresConverter.inc.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Since
4.0.0

Definition at line 42 of file DALPostgresConverter.inc.

Member Function Documentation

convertCallQuery ( array  $callQuery)
protected

Converts a single CALL query.

Parameters
array$callQueryThe structure defining the CALL query.
Since
4.0.0
Returns
string

Definition at line 229 of file DALPostgresConverter.inc.

convertCreateIndexes ( array  $table)
protected

Converts list of Index to SQL string.

Parameters
array$tableThe table array.
Since
4.0.0
Returns
string

Definition at line 87 of file DALPostgresConverter.inc.

convertCreateTable ( array  $table)

Converts create statement to SQL string.

Indexes are added after creating the table.

Parameters
array$tableCREATE array.
Since
4.0.0
Returns
string

Definition at line 58 of file DALPostgresConverter.inc.

convertSingleIndex ( array  $idx,
  $tableName 
)
protected

Converts single Index to its SQL string.

Postgres: INDEX index_name (assetid, linkid).

Parameters
array$idxSingle index array.
string$tableNameName of the table.
Since
4.0.0
Returns
string

Definition at line 113 of file DALPostgresConverter.inc.

handleFunctionConcat ( array  $args)
protected

Handles the CONCAT() function call.

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

Definition at line 193 of file DALPostgresConverter.inc.

handleFunctionSeqCurrVal ( array  $seqName)
protected

Handles the seqCurrVal() function call.

This function should be used to get the current value of a sequence. Note: seqName is a keyword and will not be quoted by PDO.

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

Definition at line 152 of file DALPostgresConverter.inc.

handleFunctionSeqNextVal ( array  $seqName)
protected

Handles the seqNextVal() function call.

This function should be used to get the next value of a sequence. Note: seqName is a keyword and will not be quoted by PDO.

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

Definition at line 133 of file DALPostgresConverter.inc.

handleFunctionSequenceExists (   $sequenceName)

Handles sequence exists.

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

Definition at line 168 of file DALPostgresConverter.inc.

handleFunctionTableExists (   $tableName,
  $schema = NULL 
)

Handles table exists.

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

Definition at line 247 of file DALPostgresConverter.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 212 of file DALPostgresConverter.inc.


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