summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc/odbc_forge.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-04-09 15:30:36 +0200
committerAndrey Andreev <narf@bofh.bg>2012-04-09 15:30:36 +0200
commit871a6f979e4291365c40247158ccde8fccca3ae5 (patch)
tree46b2ec89456d0dc1aec053d1feaf78c1e2b97d47 /system/database/drivers/odbc/odbc_forge.php
parent8e286e96af6f0487e9339d5d87c35a539a6879c6 (diff)
parent918be7963f6fa3461d612ea7ca4c9774c12f9da5 (diff)
Merge upstream branch
Diffstat (limited to 'system/database/drivers/odbc/odbc_forge.php')
-rw-r--r--system/database/drivers/odbc/odbc_forge.php65
1 files changed, 4 insertions, 61 deletions
diff --git a/system/database/drivers/odbc/odbc_forge.php b/system/database/drivers/odbc/odbc_forge.php
index 5b76b1cea..39a0d4dae 100644
--- a/system/database/drivers/odbc/odbc_forge.php
+++ b/system/database/drivers/odbc/odbc_forge.php
@@ -34,35 +34,8 @@
*/
class CI_DB_odbc_forge extends CI_DB_forge {
- /**
- * Create database
- *
- * @param string the database name
- * @return bool
- */
- public function _create_database()
- {
- // ODBC has no "create database" command since it's
- // designed to connect to an existing database
- return ($this->db->db_debug) ? $this->db->display_error('db_unsuported_feature') : FALSE;
- }
-
- // --------------------------------------------------------------------
-
- /**
- * Drop database
- *
- * @param string the database name
- * @return bool
- */
- public function _drop_database($name)
- {
- // ODBC has no "drop database" command since it's
- // designed to connect to an existing database
- return ($this->db->db_debug) ? $this->db->display_error('db_unsuported_feature') : FALSE;
- }
-
- // --------------------------------------------------------------------
+ protected $_drop_database = 'DROP DATABASE %s';
+ protected $_drop_table = 'DROP TABLE %s';
/**
* Create Table
@@ -74,7 +47,7 @@ class CI_DB_odbc_forge extends CI_DB_forge {
* @param bool should 'IF NOT EXISTS' be added to the SQL
* @return bool
*/
- public function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
+ protected function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
{
$sql = 'CREATE TABLE ';
@@ -143,19 +116,6 @@ class CI_DB_odbc_forge extends CI_DB_forge {
// --------------------------------------------------------------------
/**
- * Drop Table
- *
- * @return bool
- */
- public function _drop_table($table)
- {
- // Not a supported ODBC feature
- return ($this->db->db_debug) ? $this->db->display_error('db_unsuported_feature') : FALSE;
- }
-
- // --------------------------------------------------------------------
-
- /**
* Alter table query
*
* Generates a platform-specific query so that a table can be altered
@@ -170,7 +130,7 @@ class CI_DB_odbc_forge extends CI_DB_forge {
* @param string the field after which we should add the new field
* @return string
*/
- public function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '')
+ protected function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '')
{
$sql = 'ALTER TABLE '.$this->db->protect_identifiers($table).' '.$alter_type.' '.$this->db->protect_identifiers($column_name);
@@ -186,23 +146,6 @@ class CI_DB_odbc_forge extends CI_DB_forge {
.($after_field != '' ? ' AFTER '.$this->db->protect_identifiers($after_field) : '');
}
-
- // --------------------------------------------------------------------
-
- /**
- * Rename a table
- *
- * Generates a platform-specific query so that a table can be renamed
- *
- * @param string the old table name
- * @param string the new table name
- * @return string
- */
- public function _rename_table($table_name, $new_table_name)
- {
- return 'ALTER TABLE '.$this->db->protect_identifiers($table_name).' RENAME TO '.$this->db->protect_identifiers($new_table_name);
- }
-
}
/* End of file odbc_forge.php */