summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlsrv/sqlsrv_utility.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-01-26 01:04:37 +0100
committerAndrey Andreev <narf@bofh.bg>2012-01-26 01:04:37 +0100
commit0e8968ab7c309d17cd61079f7554ced1411a8792 (patch)
tree1fe173a25d1f2857f0cdc4bf34023d5d7314fc4e /system/database/drivers/sqlsrv/sqlsrv_utility.php
parented6485b7c72cf1d1c0ce1a329677a47f8840098a (diff)
Improve the SQLSRV (MSSQL) database driver
Diffstat (limited to 'system/database/drivers/sqlsrv/sqlsrv_utility.php')
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_utility.php39
1 files changed, 17 insertions, 22 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_utility.php b/system/database/drivers/sqlsrv/sqlsrv_utility.php
index e96df96f9..d2a421208 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_utility.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_utility.php
@@ -1,13 +1,13 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* NOTICE OF LICENSE
- *
+ *
* Licensed under the Open Software License version 3.0
- *
+ *
* This source file is subject to the Open Software License (OSL 3.0) that is
* bundled with this package in the files license.txt / license.rst. It is
* also available through the world wide web at this URL:
@@ -25,8 +25,6 @@
* @filesource
*/
-// ------------------------------------------------------------------------
-
/**
* SQLSRV Utility Class
*
@@ -39,12 +37,11 @@ class CI_DB_sqlsrv_utility extends CI_DB_utility {
/**
* List databases
*
- * @access private
- * @return bool
+ * @return string
*/
- function _list_databases()
+ public function _list_databases()
{
- return "EXEC sp_helpdb"; // Can also be: EXEC sp_databases
+ return 'EXEC sp_helpdb'; // Can also be: EXEC sp_databases
}
// --------------------------------------------------------------------
@@ -54,13 +51,12 @@ class CI_DB_sqlsrv_utility extends CI_DB_utility {
*
* Generates a platform-specific query so that a table can be optimized
*
- * @access private
* @param string the table name
- * @return object
+ * @return string
*/
- function _optimize_table($table)
+ public function _optimize_table($table)
{
- return FALSE; // Is this supported in MS SQL?
+ return 'ALTER INDEX all ON '.$this->db->protect_identifiers($table).' REORGANIZE';
}
// --------------------------------------------------------------------
@@ -70,13 +66,13 @@ class CI_DB_sqlsrv_utility extends CI_DB_utility {
*
* Generates a platform-specific query so that a table can be repaired
*
- * @access private
* @param string the table name
- * @return object
+ * @return bool
*/
- function _repair_table($table)
+ public function _repair_table($table)
{
- return FALSE; // Is this supported in MS SQL?
+ // Not supported in MSSQL
+ return FALSE;
}
// --------------------------------------------------------------------
@@ -84,11 +80,10 @@ class CI_DB_sqlsrv_utility extends CI_DB_utility {
/**
* MSSQL Export
*
- * @access private
* @param array Preferences
- * @return mixed
+ * @return bool
*/
- function _backup($params = array())
+ public function _backup($params = array())
{
// Currently unsupported
return $this->db->display_error('db_unsuported_feature');
@@ -96,5 +91,5 @@ class CI_DB_sqlsrv_utility extends CI_DB_utility {
}
-/* End of file mssql_utility.php */
-/* Location: ./system/database/drivers/mssql/mssql_utility.php */ \ No newline at end of file
+/* End of file sqlsrv_utility.php */
+/* Location: ./system/database/drivers/sqlsrv/sqlsrv_utility.php */