mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Delete the tweakTempTable() thing used to support temp tables in mssql.
Was hacky and incomplete. Proper solution must be mssql exclusive.
This commit is contained in:
parent
21237187fb
commit
0f887b881e
@ -492,8 +492,6 @@ class database_manager {
|
||||
* @return void
|
||||
*/
|
||||
public function create_temp_table(xmldb_table $xmldb_table) {
|
||||
/// hack for mssql - it requires names to start with #
|
||||
$xmldb_table = $this->generator->tweakTempTable($xmldb_table);
|
||||
|
||||
/// Check table doesn't exist
|
||||
if ($this->table_exists($xmldb_table, true)) {
|
||||
@ -517,8 +515,6 @@ class database_manager {
|
||||
* @return void
|
||||
*/
|
||||
public function drop_temp_table(xmldb_table $xmldb_table) {
|
||||
/// mssql requires names to start with #
|
||||
$xmldb_table = $this->generator->tweakTempTable($xmldb_table);
|
||||
|
||||
/// Check table doesn't exist
|
||||
if (!$this->table_exists($xmldb_table, true)) {
|
||||
|
@ -124,16 +124,6 @@ class mssql_sql_generator extends sql_generator {
|
||||
return $sqlarr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tweaks the temp table instance - required for mssql # naming
|
||||
*/
|
||||
public function tweakTempTable($xmldb_table) {
|
||||
if (strpos($xmldb_table->getName(), '#') !== 0) {
|
||||
$xmldb_table->setName('#'.$xmldb_table->getName()); // MSSQL requires temp table names to start with #
|
||||
}
|
||||
return $xmldb_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given one XMLDB Type, lenght and decimals, returns the DB proper SQL type
|
||||
*/
|
||||
|
@ -370,13 +370,6 @@ abstract class sql_generator {
|
||||
return $sqlarr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tweaks the temp table instance - required for mssql # naming
|
||||
*/
|
||||
public function tweakTempTable($xmldb_table) {
|
||||
return $xmldb_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given one correct xmldb_index, returns the SQL statements
|
||||
* needed to create it (in array)
|
||||
|
Loading…
x
Reference in New Issue
Block a user