SilverStripe\MSSQL\MSSQLAzureDatabase
Specific support for SQL Azure databases running on Windows Azure.
Currently only supports the SQLSRV driver from Microsoft.
Some important things about SQL Azure:
Selecting a database is not supported.
In order to change the database currently in use, you need to connect to
the database using the "Database" parameter with sqlsrv_connect()
Multiple active result sets are not supported. This means you can't
have two query results open at once.
Fulltext indexes are not supported.
- Author: Sean Harvey <sean at silverstripe dot com>
Synopsis
class MSSQLAzureDatabase
extends MSSQLDatabase
{
- // members
- protected array $parameters = ;
- // Inherited members from MSSQLDatabase
- public static array $noiseWords;
- protected boolean $supportsTransactions;
- protected $fullTextEnabled;
- protected bool $transactionNesting;
- // methods
- public void fullTextEnabled()
- public void __construct()
- public void connect()
- protected void connectDatabase()
- public bool selectDatabase()
- // Inherited methods from MSSQLDatabase
- public static void set_collation()
- public static string get_collation()
- public void connect()
- public boolean fullTextEnabled()
- protected boolean updateFullTextEnabled()
- public void supportsCollations()
- public void supportsTimezoneOverride()
- public void getDatabaseServer()
- public void selectDatabase()
- public void clearTable()
- public void now()
- public void random()
- public PaginatedList searchEngine()
- public void allowPrimaryKeyEditing()
- public string fullTextSearchMSSQL()
- public array removeStopwords()
- public void supportsTransactions()
- public boolean supportsExtensions()
- public void transactionStart()
- public void transactionSavepoint()
- public void transactionRollback()
- public void transactionEnd()
- protected void resetTransactionNesting()
- public void query()
- public void preparedQuery()
- protected void inspectQuery()
- public void comparisonClause()
- public string formattedDatetimeClause()
- public string datetimeIntervalClause()
- public string datetimeDifferenceClause()
Hierarchy
Extends
Members
protected
- $fullTextEnabled
—
boolean
Cached flag to determine if full-text is enabled. This is set by {@link MSSQLDatabase::fullTextEnabled()} - $parameters
—
array
List of parameters used to create new Azure connections between databases -
$supportsTransactions
Transactions will work with FreeTDS, but not entirely with sqlsrv driver on Windows with MARS enabled. - $transactionNesting — SilverStripe\MSSQL\bool
public
-
$noiseWords
Words that will trigger an error if passed to a SQL Server fulltext search
Methods
protected
- connectDatabase() — Connect to a database using the provided parameters
public
- __construct()
- connect() — Connect to a SQL Azure database with the given parameters.
- fullTextEnabled()
- selectDatabase() — Switches to the given database.
Inherited from SilverStripe\MSSQL\MSSQLDatabase
protected
- inspectQuery()
- resetTransactionNesting() — In error condition, set transactionNesting to zero
- updateFullTextEnabled() — Checks whether the current SQL Server version has full-text support installed and full-text is enabled for this database.
public
- allowPrimaryKeyEditing() — Allow auto-increment primary key editing on the given table.
- clearTable()
- comparisonClause()
- connect() — Connect to a MS SQL database.
- datetimeDifferenceClause() — Function to return an SQL datetime expression for MSSQL.
- datetimeIntervalClause() — Function to return an SQL datetime expression for MSSQL.
- formattedDatetimeClause() — Function to return an SQL datetime expression for MSSQL used for querying a datetime in a certain format
- fullTextEnabled() — Checks whether the current SQL Server version has full-text support installed and full-text is enabled for this database.
- fullTextSearchMSSQL() — Returns a SQL fragment for querying a fulltext search index
- getDatabaseServer()
- get_collation() — The default collation of the MSSQL nvarchar fields that we create.
- now() — SQL Server uses CURRENT_TIMESTAMP for the current date/time.
- preparedQuery()
- query()
- random() — Returns the database-specific version of the random() function
- removeStopwords() — Remove stopwords that would kill a MSSQL full-text query
- searchEngine() — The core search engine configuration.
- selectDatabase()
- set_collation() — Set the default collation of the MSSQL nvarchar fields that we create.
- supportsCollations()
- supportsExtensions() — This is a quick lookup to discover if the database supports particular extensions Currently, MSSQL supports no extensions
- supportsTimezoneOverride()
- supportsTransactions() — Does this database support transactions?
- transactionEnd()
- transactionRollback()
- transactionSavepoint()
- transactionStart() — Start transaction. READ ONLY not supported.