mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE: support for advanced database options now included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88296 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f552743006
commit
84ec644448
@ -214,7 +214,7 @@ class MySQLDatabase extends Database {
|
||||
* - 'temporary' - If true, then a temporary table will be created
|
||||
* @return The table name generated. This may be different from the table name, for example with temporary tables.
|
||||
*/
|
||||
public function createTable($table, $fields = null, $indexes = null, $options = null) {
|
||||
public function createTable($table, $fields = null, $indexes = null, $options = null, $advancedOptions = null) {
|
||||
$fieldSchemas = $indexSchemas = "";
|
||||
|
||||
$addOptions = empty($options[get_class($this)]) ? "ENGINE=MyISAM" : $options[get_class($this)];
|
||||
@ -244,7 +244,7 @@ class MySQLDatabase extends Database {
|
||||
* @param $alteredIndexes Updated indexes, a map of index name => index type
|
||||
* @param $alteredOptions
|
||||
*/
|
||||
public function alterTable($tableName, $newFields = null, $newIndexes = null, $alteredFields = null, $alteredIndexes = null, $alteredOptions = null) {
|
||||
public function alterTable($tableName, $newFields = null, $newIndexes = null, $alteredFields = null, $alteredIndexes = null, $alteredOptions = null, $advancedOptions = null) {
|
||||
$fieldSchemas = $indexSchemas = "";
|
||||
$alterList = array();
|
||||
|
||||
@ -870,6 +870,22 @@ class MySQLDatabase extends Database {
|
||||
public function supportsTransactions(){
|
||||
return $this->supportsTransactions;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a quick lookup to discover if the database supports particular extensions
|
||||
* Currently, MySQL supports no extensions
|
||||
*/
|
||||
public function supportsExtensions($extensions=Array('partitions', 'tablespaces', 'clustering')){
|
||||
if(isset($extensions['partitions']))
|
||||
return false;
|
||||
elseif(isset($extensions['tablespaces']))
|
||||
return false;
|
||||
elseif(isset($extensions['clustering']))
|
||||
return false;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Start a prepared transaction
|
||||
* See http://developer.postgresql.org/pgdocs/postgres/sql-set-transaction.html for details on transaction isolation options
|
||||
|
Loading…
Reference in New Issue
Block a user