Doctrine


Doctrine\DBAL\Platforms\OraclePlatform
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 34

Class OraclePlatform

Class:OraclePlatform - Superclass: AbstractPlatform
AbstractPlatform
⌊ OraclePlatform

public class OraclePlatform
extends AbstractPlatform

OraclePlatform.

Since:
2.0
Author:
Roman Borschel
Lukas Smith (PEAR MDB2 library)
Benjamin Eberlei
License:
http://www.opensource.org/licenses/lgpl-license.php LGPL
See Also:
www.doctrine-project.org
Version:
$Revision: 3938 $
Todo:
Remove any unnecessary methods.

Fields inherited from Doctrine\DBAL\Platforms\AbstractPlatform
CREATE_FOREIGNKEYS, CREATE_INDEXES, TRIM_BOTH, TRIM_LEADING, TRIM_TRAILING, TRIM_UNSPECIFIED
Method Summary
string

fixSchemaElementName(mixed schemaElementName, string schemaName)

Makes any fixes to a name of a schema element (table, sequence, ...) that are required by restrictions of the platform, like a maximum length.

array

getAlterTableSQL(TableDiff diff, string diff->name, array changes, boolean check)

Gets the sql statements for altering an existing table.

string

getBigIntTypeDeclarationSQL(mixed field, array columnDef)

string

getBooleanTypeDeclarationSQL(mixed field, array columnDef)

void

getClobTypeDeclarationSQL(array field)

@override

void

getCreateAutoincrementSql(mixed name, mixed table, mixed start)

string

getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence)

Gets the SQL used to create a sequence that starts with a given value and increments by the given allocation size.

void

getCreateTemporaryTableSnippetSQL()

void

getCreateViewSQL(mixed name, mixed sql)

string

getDateTimeFormatString()

Gets the format string, as accepted by the date() function, that describes the format of a stored datetime value of this platform.

string

getDateTimeTypeDeclarationSQL(array fieldDeclaration)

string

getDateTypeDeclarationSQL(array fieldDeclaration)

void

getDropAutoincrementSql(mixed table)

void

getDropDatabaseSQL(mixed database)

string

getDropForeignKeySQL(ForeignKeyConstraint|string foreignKey, Table|string table)

string

getDropSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence)

void

getDropViewSQL(mixed name)

string

getGuidExpression()

Returns global unique identifier

string

getIntegerTypeDeclarationSQL(mixed field, array columnDef)

void

getListDatabasesSQL()

void

getListSequencesSQL(mixed database)

void

getListTableColumnsSQL(mixed table)

void

getListTableConstraintsSQL(mixed table)

void

getListTableForeignKeysSQL(mixed table)

string

getListTableIndexesSQL(string table)

void

getListTablesSQL()

string

getListViewsSQL(string database)

Get the SQL to list all views of a database or user.

integer

getLocateExpression(string str, string substr, mixed startPos, int pos)

returns the position of the first occurrence of substring $substr in string $str

int

getMaxIdentifierLength()

Maximum length of any given databse identifier, like tables or column names.

string

getName()

Get the platform name for this instance

string

getNowExpression(mixed type)

Return string to call a variable with the current timestamp inside an SQL statement There are three special variables for current date and time: - CURRENT_TIMESTAMP (date and time, TIMESTAMP type) - CURRENT_DATE (date, DATE type) - CURRENT_TIME (time, TIME type)

string

getSQLResultCasing(string column)

Gets the character casing of a column in an SQL result set of this platform.

void

getSequenceNextValSQL(string sequenceName)

{@inheritdoc}

void

getSetTransactionIsolationSQL(integer level)

{@inheritdoc}

string

getSmallIntTypeDeclarationSQL(mixed field, array columnDef)

string

getSubstringExpression(string value, integer position, integer length, integer from, integer len)

return string to call a function to get a substring inside an SQL statementNote: Not SQL92, but common functionality.

string

getTimeTypeDeclarationSQL(array fieldDeclaration)

string

getTruncateTableSQL(string tableName, bool cascade)

void

getVarcharTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a VARCHAR column on the Oracle platform.

string

modifyLimitQuery(string query, integer limit, integer offset)

Adds an driver-specific LIMIT clause to the query

boolean

prefersSequences()

Whether the platform prefers sequences for ID generation.

bool

supportsForeignKeyOnUpdate()

Does this platform supports onUpdate in foreign key constraints?

boolean

supportsSequences()

Whether the platform supports sequences.

Methods inherited from Doctrine\DBAL\Platforms\AbstractPlatform
convertBooleans, createsExplicitIndexForForeignKeys, fixSchemaElementName, getAcosExpression, getAdvancedForeignKeyOptionsSQL, getAlterTableSQL, getAvgExpression, getBetweenExpression, getBigIntTypeDeclarationSQL, getBooleanTypeDeclarationSQL, getCheckDeclarationSQL, getClobTypeDeclarationSQL, getColumnCharsetDeclarationSQL, getColumnCollationDeclarationSQL, getColumnDeclarationListSQL, getColumnDeclarationSQL, getConcatExpression, getCosExpression, getCountExpression, getCreateConstraintSQL, getCreateDatabaseSQL, getCreateForeignKeySQL, getCreateIndexSQL, getCreateSequenceSQL, getCreateTableSQL, getCreateTemporaryTableSnippetSQL, getCreateViewSQL, getCurrentDateSQL, getCurrentTimeSQL, getCurrentTimestampSQL, getCustomTypeDeclarationSQL, getDateFormatString, getDateTimeFormatString, getDateTimeTypeDeclarationSQL, getDateTypeDeclarationSQL, getDecimalTypeDeclarationSQL, getDefaultTransactionIsolationLevel, getDefaultValueDeclarationSQL, getDropConstraintSQL, getDropDatabaseSQL, getDropForeignKeySQL, getDropIndexSQL, getDropSequenceSQL, getDropTableSQL, getDropViewSQL, getEmptyIdentityInsertSQL, getForUpdateSql, getForeignKeyBaseDeclarationSQL, getForeignKeyDeclarationSQL, getForeignKeyReferentialActionSQL, getIdentifierQuoteCharacter, getIdentityColumnNullInsertSQL, getInExpression, getIndexDeclarationSQL, getIndexFieldDeclarationListSQL, getIntegerTypeDeclarationSQL, getIsNotNullExpression, getIsNullExpression, getLengthExpression, getListDatabasesSQL, getListSequencesSQL, getListTableColumnsSQL, getListTableConstraintsSQL, getListTableForeignKeysSQL, getListTableIndexesSQL, getListTablesSQL, getListUsersSQL, getListViewsSQL, getLocateExpression, getLowerExpression, getLtrimExpression, getMaxExpression, getMaxIdentifierLength, getMd5Expression, getMinExpression, getModExpression, getName, getNotExpression, getNowExpression, getPiExpression, getRegexpExpression, getRoundExpression, getRtrimExpression, getSQLResultCasing, getSequenceNextValSQL, getSetCharsetSQL, getSetTransactionIsolationSQL, getShowDatabasesSQL, getSinExpression, getSmallIntTypeDeclarationSQL, getSqlCommentEndString, getSqlCommentStartString, getSubstringExpression, getSumExpression, getTemporaryTableSQL, getTimeFormatString, getTimeTypeDeclarationSQL, getTrimExpression, getTruncateTableSQL, getUniqueConstraintDeclarationSQL, getUniqueFieldDeclarationSQL, getUpperExpression, getVarcharMaxLength, getVarcharTypeDeclarationSQL, getWildcards, modifyLimitQuery, prefersIdentityColumns, prefersSequences, quoteIdentifier, supportsAlterTable, supportsForeignKeyConstraints, supportsForeignKeyOnUpdate, supportsGettingAffectedRows, supportsIdentityColumns, supportsIndexes, supportsPrimaryConstraints, supportsSavepoints, supportsSchemas, supportsSequences, supportsTransactions

Method Detail

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 612

fixSchemaElementName

public string fixSchemaElementName(mixed schemaElementName, string schemaName)

Makes any fixes to a name of a schema element (table, sequence, ...) that are required by restrictions of the platform, like a maximum length.


/Doctrine/DBAL/Platforms/OraclePlatform.php at line 493

getAlterTableSQL

public array getAlterTableSQL(TableDiff diff, string diff->name, array changes, boolean check)

Gets the sql statements for altering an existing table.

The method returns an array of sql statements, since some platforms need several statements.

Parameters:
diff->name - name of the table that is intended to be changed.
changes - associative array that contains the details of each type *
check - indicates whether the function should just check if the DBMS driver can perform the requested table alterations if the value is true or actually perform them otherwise.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 180

getBigIntTypeDeclarationSQL

public string getBigIntTypeDeclarationSQL(mixed field, array columnDef)

Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 164

getBooleanTypeDeclarationSQL

public string getBooleanTypeDeclarationSQL(mixed field, array columnDef)

Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 249

getClobTypeDeclarationSQL

public void getClobTypeDeclarationSQL(array field)


/Doctrine/DBAL/Platforms/OraclePlatform.php at line 338

getCreateAutoincrementSql

public void getCreateAutoincrementSql(mixed name, mixed table, mixed start)

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 116

getCreateSequenceSQL

public string getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence)

Gets the SQL used to create a sequence that starts with a given value and increments by the given allocation size.

Need to specifiy minvalue, since start with is hidden in the system and MINVALUE <= START WITH. Therefore we can use MINVALUE to be able to get a hint what START WITH was for later introspection in listSequences()

Throws:
DBALException

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 602

getCreateTemporaryTableSnippetSQL

public void getCreateTemporaryTableSnippetSQL()

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 328

getCreateViewSQL

public void getCreateViewSQL(mixed name, mixed sql)

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 607

getDateTimeFormatString

public string getDateTimeFormatString()

Gets the format string, as accepted by the date() function, that describes the format of a stored datetime value of this platform.

Returns:
The format string.
Todo:
We need to get the specific format for each dbms and override this function for each platform

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 196

getDateTimeTypeDeclarationSQL

public string getDateTimeTypeDeclarationSQL(array fieldDeclaration)

Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 204

getDateTypeDeclarationSQL

public string getDateTypeDeclarationSQL(array fieldDeclaration)

Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 389

getDropAutoincrementSql

public void getDropAutoincrementSql(mixed table)

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 476

getDropDatabaseSQL

public void getDropDatabaseSQL(mixed database)

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 463

getDropForeignKeySQL

public string getDropForeignKeySQL(ForeignKeyConstraint|string foreignKey, Table|string table)


/Doctrine/DBAL/Platforms/OraclePlatform.php at line 449

getDropSequenceSQL

public string getDropSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence)


/Doctrine/DBAL/Platforms/OraclePlatform.php at line 333

getDropViewSQL

public void getDropViewSQL(mixed name)

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 100

getGuidExpression

public string getGuidExpression()

Returns global unique identifier

Returns:
to get global unique identifier
Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 172

getIntegerTypeDeclarationSQL

public string getIntegerTypeDeclarationSQL(mixed field, array columnDef)

Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 254

getListDatabasesSQL

public void getListDatabasesSQL()

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 259

getListSequencesSQL

public void getListSequencesSQL(mixed database)

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 438

getListTableColumnsSQL

public void getListTableColumnsSQL(mixed table)

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 432

getListTableConstraintsSQL

public void getListTableConstraintsSQL(mixed table)

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 405

getListTableForeignKeysSQL

public void getListTableForeignKeysSQL(mixed table)

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 304

getListTableIndexesSQL

public string getListTableIndexesSQL(string table)

License:
New BSD License
See Also:
http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaOracleReader.html

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 318

getListTablesSQL

public void getListTablesSQL()

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 323

getListViewsSQL

public string getListViewsSQL(string database)

Get the SQL to list all views of a database or user.


/Doctrine/DBAL/Platforms/OraclePlatform.php at line 85

getLocateExpression

public integer getLocateExpression(string str, string substr, mixed startPos, int pos)

returns the position of the first occurrence of substring $substr in string $str

Parameters:
substr - literal string to find
str - literal string
pos - position to start at, beginning of string by default

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 626

getMaxIdentifierLength

public int getMaxIdentifierLength()

Maximum length of any given databse identifier, like tables or column names.


/Doctrine/DBAL/Platforms/OraclePlatform.php at line 550

getName

public string getName()

Get the platform name for this instance


/Doctrine/DBAL/Platforms/OraclePlatform.php at line 66

getNowExpression

public string getNowExpression(mixed type)

Return string to call a variable with the current timestamp inside an SQL statement There are three special variables for current date and time: - CURRENT_TIMESTAMP (date and time, TIMESTAMP type) - CURRENT_DATE (date, DATE type) - CURRENT_TIME (time, TIME type)

Returns:
to call a variable with the current timestamp
Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 597

getSQLResultCasing

public string getSQLResultCasing(string column)

Gets the character casing of a column in an SQL result set of this platform.

Oracle returns all column names in SQL result sets in uppercase.

Parameters:
column - The column name for which to get the correct character casing.
Returns:
The column name in the character casing used in SQL result sets.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 130

getSequenceNextValSQL

public void getSequenceNextValSQL(string sequenceName)

Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 141

getSetTransactionIsolationSQL

public void getSetTransactionIsolationSQL(integer level)

Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 188

getSmallIntTypeDeclarationSQL

public string getSmallIntTypeDeclarationSQL(mixed field, array columnDef)

Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 47

getSubstringExpression

public string getSubstringExpression(string value, integer position, integer length, integer from, integer len)

return string to call a function to get a substring inside an SQL statement

Note: Not SQL92, but common functionality.

Parameters:
value - an sql string literal or column name/alias
position - where to start the substring portion
length - the substring portion length
Returns:
SQL substring function with given parameters
Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 212

getTimeTypeDeclarationSQL

public string getTimeTypeDeclarationSQL(array fieldDeclaration)

Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 649

getTruncateTableSQL

public string getTruncateTableSQL(string tableName, bool cascade)

Inheritdoc.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 231

getVarcharTypeDeclarationSQL

public void getVarcharTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a VARCHAR column on the Oracle platform.

Params:
array $field
Override.

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 563

modifyLimitQuery

public string modifyLimitQuery(string query, integer limit, integer offset)

Adds an driver-specific LIMIT clause to the query

Parameters:
query - query to modify
limit - limit the number of rows
offset - start reading from given offset
Returns:
the modified query

/Doctrine/DBAL/Platforms/OraclePlatform.php at line 540

prefersSequences

public boolean prefersSequences()

Whether the platform prefers sequences for ID generation.


/Doctrine/DBAL/Platforms/OraclePlatform.php at line 641

supportsForeignKeyOnUpdate

public bool supportsForeignKeyOnUpdate()

Does this platform supports onUpdate in foreign key constraints?


/Doctrine/DBAL/Platforms/OraclePlatform.php at line 636

supportsSequences

public boolean supportsSequences()

Whether the platform supports sequences.


Doctrine