Class

PostgreSqlPlatform

Package: io Author: Roman Borschel <roman@code-factory.org> Author: Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) Since: 2.0 Located at io/db/dbms/Doctrine/DBAL/Platform/PostgreSqlPlatform.php

PostgreSqlPlatform.

AbstractPlatform
Extended by PostgreSqlPlatform
Methods summary
public
# __construct( )

Constructor. Creates a new PostgreSqlPlatform.

public string
# getMd5Expression( mixed $column )

Returns the md5 sum of a field.

public string
# getSubstringExpression( string $value, integer $from, integer $len = null )

Returns part of a string.

public string
# getAgeExpression( string $timestamp1, string $timestamp2 = null )

PostgreSQLs AGE(<timestamp1> [, <timestamp2>]) function.

public string
# getDatePartExpression( string $text, string $time )

PostgreSQLs DATE_PART( <text>, <time> ) function.

public string
# getToCharExpression( string $time, string $text )

PostgreSQLs TO_CHAR( <time>, <text> ) function.

public string
# getNowExpression( )

Returns the SQL string to return the current system date and time.

public string
# getRegexpExpression( )

regexp

public return
# getRandomExpression( )

return string to call a function to get random value inside an SQL statement

public string
# getMatchPatternExpression( array $pattern, string $operator = null, string $field = null )

build a pattern matching string

public boolean
# supportsSequences( )

Whether the platform supports sequences. Postgres has native support for sequences.

public boolean
# supportsSchemas( )

Whether the platform supports database schemas.

public boolean
# supportsIdentityColumns( )

Whether the platform supports identity columns. Postgres supports these through the SERIAL keyword.

public boolean
# prefersSequences( )

Whether the platform prefers sequences for ID generation.

public
public
public
public
public
public
public
public
# getListTableForeignKeysSql( mixed $table, mixed $database = null )
public
# getCreateViewSql( mixed $name, mixed $sql )
public
public
public
public
public
# getCreateDatabaseSql( string $name )

create a new database

public
# getDropDatabaseSql( string $name )

drop an existing database

public string
# getAdvancedForeignKeyOptionsSql( array $definition )

getAdvancedForeignKeyOptions Return the FOREIGN KEY query section dealing with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

public array
# getAlterTableSql( string $name, array $changes, boolean $check = false )

generates the sql for altering an existing table on postgresql

public string
# getCreateSequenceSql( string $sequenceName, integer $start = 1, integer $allocationSize = 1 )

Gets the SQL to create a sequence on this platform.

public
# getDropSequenceSql( string $sequenceName )

drop existing sequence

public unknown
# getCreateTableSql( unknown_type $name, array $fields, array $options = array() )

Gets the SQL used to create a table.

public
# convertBooleans( array $item )

Postgres wants boolean values converted to the strings 'true'/'false'.

public
public
# getSetTransactionIsolationSql( integer $level )

Get sql to set the transaction isolation level

public string
# getBooleanTypeDeclarationSql( array $field )
public string
# getIntegerTypeDeclarationSql( array $field )
public string
# getDefaultValueDeclarationSql( array $field )
public string
# getBigIntTypeDeclarationSql( array $field )
public string
# getSmallIntTypeDeclarationSql( array $field )
public string
# getDateTimeTypeDeclarationSql( array $fieldDeclaration )
public string
# getDateTypeDeclarationSql( array $fieldDeclaration )
protected string
# _getCommonIntegerTypeDeclarationSql( array $columnDef )
public
# getVarcharTypeDeclarationSql( array $field )

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

public
# getClobTypeDeclarationSql( array $field )
public string
# getName( )

Get the platform name for this instance

public string
# getSqlResultCasing( string $column )

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

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.

public string
# getEmptyIdentityInsertSql( string $quotedTableName, string $quotedIdentifierColumnName )

Get the insert sql for an empty insert statement

Methods inherited from AbstractPlatform
_getTransactionIsolationLevelSql(), fixSchemaElementName(), getAcosExpression(), getAvgExpression(), getBetweenExpression(), getCharsetFieldDeclaration(), getCheckDeclarationSql(), getColumnCharsetDeclarationSql(), getColumnCollationDeclarationSql(), getColumnDeclarationListSql(), getColumnDeclarationSql(), getConcatExpression(), getCosExpression(), getCountExpression(), getCreateConstraintSql(), getCreateForeignKeySql(), getCreateIndexSql(), getCreateTemporaryTableSnippetSql(), getCurrentDateSql(), getCurrentTimeSql(), getCurrentTimestampSql(), getDateFormatString(), getDecimalTypeDeclarationSql(), getDefaultTransactionIsolationLevel(), getDropConstraintSql(), getDropForeignKeySql(), getDropIndexSql(), getDropTableSql(), getFloatTypeDeclarationSql(), getForUpdateSql(), getForeignKeyBaseDeclarationSql(), getForeignKeyDeclarationSql(), getForeignKeyReferentialActionSql(), getIdentifierQuoteCharacter(), getIdentityColumnNullInsertSql(), getInExpression(), getIndexDeclarationSql(), getIndexFieldDeclarationListSql(), getIsNotNullExpression(), getIsNullExpression(), getLengthExpression(), getLocateExpression(), getLowerExpression(), getLtrimExpression(), getMaxExpression(), getMinExpression(), getModExpression(), getNotExpression(), getPiExpression(), getRoundExpression(), getRtrimExpression(), getSetCharsetSql(), getShowDatabasesSql(), getSinExpression(), getSqlCommentEndString(), getSqlCommentStartString(), getSumExpression(), getTemporaryTableSql(), getTimeFormatString(), getTrimExpression(), getUniqueFieldDeclarationSql(), getUpperExpression(), getVarcharMaxLength(), getWildcards(), modifyLimitQuery(), prefersIdentityColumns(), quoteIdentifier(), supportsForeignKeyConstraints(), supportsGettingAffectedRows(), supportsIndexes(), supportsPrimaryConstraints(), supportsSavepoints(), supportsTransactions(), writeLimitClause()