Doctrine


Doctrine\DBAL\Platforms\MsSqlPlatform
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 37

Class MsSqlPlatform

Class:MsSqlPlatform - Superclass: AbstractPlatform
AbstractPlatform
⌊ MsSqlPlatform

public class MsSqlPlatform
extends AbstractPlatform

The MsSqlPlatform provides the behavior, features and SQL dialect of the MySQL database platform.

Since:
2.0
Author:
Roman Borschel
Jonathan H. Wage
Benjamin Eberlei
Todo:
Rename: MsSQLPlatform
License:
http://www.opensource.org/licenses/lgpl-license.php LGPL
See Also:
www.doctrine-project.org
Version:
$Revision: 3938 $

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

getAlterTableSQL(TableDiff diff)

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

string

getConcatExpression(string arg1, string arg2, string values..., string arg1,)

Returns string to concatenate two or more string parameters

string

getCreateDatabaseSQL(string name, mixed database)

create a new database

string

getDateTimeTypeDeclarationSQL(array fieldDeclaration)

string

getDateTypeDeclarationSQL(array fieldDeclaration)

string

getDropDatabaseSQL(string name, mixed database)

drop an existing database

string

getEmptyIdentityInsertSQL(mixed quotedTableName, mixed quotedIdentifierColumnName, string tableName, string identifierColumnName)

Get the insert sql for an empty insert statement

string

getGuidExpression()

Returns global unique identifier

string

getIntegerTypeDeclarationSQL(mixed field, array columnDef)

void

getListTablesSQL()

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

getRegexpExpression()

Returns the regular expression operator.

void

getSetTransactionIsolationSQL(integer level)

Get sql to set the transaction isolation level

string

getShowDatabasesSQL()

Get sql query to show a list of database.

string

getSmallIntTypeDeclarationSQL(mixed field, array columnDef)

string

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

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

string

getTimeTypeDeclarationSQL(array fieldDeclaration)

string

getTruncateTableSQL(string tableName, bool cascade)

void

getVarcharTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a VARCHAR column type.

string

modifyLimitQuery(string query, mixed limit, mixed offset)

Adds an adapter-specific LIMIT clause to the SELECT statement.

boolean

prefersIdentityColumns()

Whether the platform prefers identity columns for ID generation.

boolean

supportsIdentityColumns()

Whether the platform supports identity columns.

boolean

supportsSavepoints()

Whether the platform supports savepoints.

string

writeLimitClause(string query, mixed limit, mixed offset)

Adds an adapter-specific LIMIT clause to the SELECT statement.

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/MsSqlPlatform.php at line 94

getAlterTableSQL

public array getAlterTableSQL(TableDiff diff)

Gets the sql statements for altering an existing table.

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


/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 287

getBigIntTypeDeclarationSQL

public string getBigIntTypeDeclarationSQL(mixed field, array columnDef)

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 364

getBooleanTypeDeclarationSQL

public string getBooleanTypeDeclarationSQL(mixed field, array columnDef)

Override.

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

getClobTypeDeclarationSQL

public void getClobTypeDeclarationSQL(array field)


/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 184

getConcatExpression

public string getConcatExpression(string arg1, string arg2, string values..., string arg1,)

Returns string to concatenate two or more string parameters

Returns:
to concatenate two strings
Override.

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

getCreateDatabaseSQL

public string getCreateDatabaseSQL(string name, mixed database)

create a new database

Parameters:
name - name of the database that should be created
Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 340

getDateTimeTypeDeclarationSQL

public string getDateTimeTypeDeclarationSQL(array fieldDeclaration)

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 348

getDateTypeDeclarationSQL

public string getDateTypeDeclarationSQL(array fieldDeclaration)

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 266

getDropDatabaseSQL

public string getDropDatabaseSQL(string name, mixed database)

drop an existing database

Parameters:
name - name of the database that should be dropped
Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 474

getEmptyIdentityInsertSQL

public string getEmptyIdentityInsertSQL(mixed quotedTableName, mixed quotedIdentifierColumnName, string tableName, string identifierColumnName)

Get the insert sql for an empty insert statement

Returns:
$sql

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

getGuidExpression

public string getGuidExpression()

Returns global unique identifier

Returns:
to get global unique identifier
Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 279

getIntegerTypeDeclarationSQL

public string getIntegerTypeDeclarationSQL(mixed field, array columnDef)

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 242

getListTablesSQL

public void getListTablesSQL()

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 374

getName

public string getName()

Get the platform name for this instance


/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 150

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/MsSqlPlatform.php at line 135

getRegexpExpression

public string getRegexpExpression()

Returns the regular expression operator.

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 271

getSetTransactionIsolationSQL

public void getSetTransactionIsolationSQL(integer level)

Get sql to set the transaction isolation level


/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 237

getShowDatabasesSQL

public string getShowDatabasesSQL()

Get sql query to show a list of database.


/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 295

getSmallIntTypeDeclarationSQL

public string getSmallIntTypeDeclarationSQL(mixed field, array columnDef)

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 167

getSubstringExpression

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

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

Returns:
to call a function to get a substring
Override.
Parameters:
value - an sql string literal or column name/alias
from - where to start the substring portion
len - the substring portion length

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 356

getTimeTypeDeclarationSQL

public string getTimeTypeDeclarationSQL(array fieldDeclaration)

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 482

getTruncateTableSQL

public string getTruncateTableSQL(string tableName, bool cascade)

Inheritdoc.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 300

getVarcharTypeDeclarationSQL

public void getVarcharTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a VARCHAR column type.


/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 388

modifyLimitQuery

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

Adds an adapter-specific LIMIT clause to the SELECT statement.

See Also:
http://lists.bestpractical.com/pipermail/rt-devel/2005-June/007339.html

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 209

prefersIdentityColumns

public boolean prefersIdentityColumns()

Whether the platform prefers identity columns for ID generation. MsSql prefers "autoincrement" identity columns since sequences can only be emulated with a table.

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 221

supportsIdentityColumns

public boolean supportsIdentityColumns()

Whether the platform supports identity columns. MsSql supports this through AUTO_INCREMENT columns.

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 232

supportsSavepoints

public boolean supportsSavepoints()

Whether the platform supports savepoints. MsSql does not.

Override.

/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 50

writeLimitClause

public string writeLimitClause(string query, mixed limit, mixed offset)

Adds an adapter-specific LIMIT clause to the SELECT statement. [ borrowed from Zend Framework ]

See Also:
http://lists.bestpractical.com/pipermail/rt-devel/2005-June/007339.html
Override.

Doctrine