summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/interbase
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-02-20 23:37:21 +0100
committerTimothy Warren <tim@timshomepage.net>2012-02-20 23:37:21 +0100
commit95562144da88784588fb2477fa0070576bd386a0 (patch)
tree2a4cfbdac203006fd9fd534b5d76a30dd52729a6 /system/database/drivers/interbase
parent51ed4ed7f6097a34ce1db7b225272bfc1b0f0bcf (diff)
Set protected visibility on applicable functions/properties
Diffstat (limited to 'system/database/drivers/interbase')
-rw-r--r--system/database/drivers/interbase/interbase_driver.php44
-rw-r--r--system/database/drivers/interbase/interbase_forge.php12
-rw-r--r--system/database/drivers/interbase/interbase_result.php6
3 files changed, 30 insertions, 32 deletions
diff --git a/system/database/drivers/interbase/interbase_driver.php b/system/database/drivers/interbase/interbase_driver.php
index aeea00d7f..ba4f9d8d9 100644
--- a/system/database/drivers/interbase/interbase_driver.php
+++ b/system/database/drivers/interbase/interbase_driver.php
@@ -45,19 +45,19 @@ class CI_DB_interbase_driver extends CI_DB {
public $dbdriver = 'interbase';
// The character used to escape with
- public $_escape_char = '"';
+ protected $_escape_char = '"';
// clause and character used for LIKE escape sequences
- public $_like_escape_str = " ESCAPE '%s' ";
- public $_like_escape_chr = '!';
+ protected $_like_escape_str = " ESCAPE '%s' ";
+ protected $_like_escape_chr = '!';
/**
* The syntax to count rows is slightly different across different
* database engines, so this string appears in each driver and is
* used for the count_all() and count_all_results() functions.
*/
- public $_count_string = "SELECT COUNT(*) AS ";
- public $_random_keyword = ' Random()'; // database specific random keyword
+ protected $_count_string = "SELECT COUNT(*) AS ";
+ protected $_random_keyword = ' Random()'; // database specific random keyword
// Keeps track of the resource for the current transaction
protected $trans;
@@ -134,7 +134,7 @@ class CI_DB_interbase_driver extends CI_DB {
*
* @return string
*/
- public function _version()
+ protected function _version()
{
if (($service = ibase_service_attach($this->hostname, $this->username, $this->password)))
{
@@ -153,7 +153,7 @@ class CI_DB_interbase_driver extends CI_DB {
* @param string an SQL query
* @return resource
*/
- public function _execute($sql)
+ protected function _execute($sql)
{
$sql = $this->_prep_query($sql);
return @ibase_query($this->conn_id, $sql);
@@ -169,7 +169,7 @@ class CI_DB_interbase_driver extends CI_DB {
* @param string an SQL query
* @return string
*/
- public function _prep_query($sql)
+ protected function _prep_query($sql)
{
return $sql;
}
@@ -333,8 +333,6 @@ class CI_DB_interbase_driver extends CI_DB {
$query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . ' FROM ' . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
- $query->result_array();
-
if ($query->num_rows() == 0)
{
return 0;
@@ -355,7 +353,7 @@ class CI_DB_interbase_driver extends CI_DB {
* @param boolean
* @return string
*/
- public function _list_tables($prefix_limit = FALSE)
+ protected function _list_tables($prefix_limit = FALSE)
{
$sql = <<<SQL
SELECT "RDB\$RELATION_NAME" FROM "RDB\$RELATIONS"
@@ -380,7 +378,7 @@ SQL;
* @param string the table name
* @return string
*/
- public function _list_columns($table = '')
+ protected function _list_columns($table = '')
{
return <<<SQL
SELECT "RDB\$FIELD_NAME" FROM "RDB\$RELATION_FIELDS"
@@ -398,7 +396,7 @@ SQL;
* @param string the table name
* @return object
*/
- public function _field_data($table)
+ protected function _field_data($table)
{
// Need to find a more efficient way to do this
// but Interbase/Firebird seems to lack the
@@ -413,7 +411,7 @@ SQL;
*
* @return string
*/
- public function _error_message()
+ protected function _error_message()
{
return ibase_errmsg();
}
@@ -425,7 +423,7 @@ SQL;
*
* @return integer
*/
- public function _error_number()
+ protected function _error_number()
{
return ibase_errcode();
}
@@ -440,7 +438,7 @@ SQL;
* @param string
* @return string
*/
- public function _escape_identifiers($item)
+ protected function _escape_identifiers($item)
{
foreach ($this->_reserved_identifiers as $id)
{
@@ -477,7 +475,7 @@ SQL;
* @param type
* @return type
*/
- public function _from_tables($tables)
+ protected function _from_tables($tables)
{
if ( ! is_array($tables))
{
@@ -500,7 +498,7 @@ SQL;
* @param array the insert values
* @return string
*/
- public function _insert($table, $keys, $values)
+ protected function _insert($table, $keys, $values)
{
return "INSERT INTO {$table} (".implode(', ', $keys).') VALUES ('.implode(', ', $values).')';
}
@@ -519,7 +517,7 @@ SQL;
* @param array the limit clause
* @return string
*/
- public function _update($table, $values, $where, $orderby = array(), $limit = FALSE)
+ protected function _update($table, $values, $where, $orderby = array(), $limit = FALSE)
{
foreach ($values as $key => $val)
{
@@ -552,7 +550,7 @@ SQL;
* @param string the table name
* @return string
*/
- public function _truncate($table)
+ protected function _truncate($table)
{
return $this->_delete($table);
}
@@ -569,7 +567,7 @@ SQL;
* @param string the limit clause
* @return string
*/
- public function _delete($table, $where = array(), $like = array(), $limit = FALSE)
+ protected function _delete($table, $where = array(), $like = array(), $limit = FALSE)
{
$conditions = '';
@@ -602,7 +600,7 @@ SQL;
* @param integer the offset value
* @return string
*/
- public function _limit($sql, $limit, $offset)
+ protected function _limit($sql, $limit, $offset)
{
//There doesn't seem to be a limit clause?
return $sql;
@@ -616,7 +614,7 @@ SQL;
* @param resource
* @return void
*/
- public function _close($conn_id)
+ protected function _close($conn_id)
{
@ibase_close($conn_id);
}
diff --git a/system/database/drivers/interbase/interbase_forge.php b/system/database/drivers/interbase/interbase_forge.php
index d9b55a87f..c7372a0bf 100644
--- a/system/database/drivers/interbase/interbase_forge.php
+++ b/system/database/drivers/interbase/interbase_forge.php
@@ -42,7 +42,7 @@ class CI_DB_interbase_forge extends CI_DB_forge {
* @param string the database name
* @return string
*/
- public function _create_database($filename='')
+ protected function _create_database($filename='')
{
// Firebird databases are flat files, so a path is required
// Hostname is needed for remote access
@@ -59,7 +59,7 @@ class CI_DB_interbase_forge extends CI_DB_forge {
* - the current db is dropped
* @return bool
*/
- public function _drop_database($name='')
+ protected function _drop_database($name='')
{
return ibase_drop_db($this->conn_id);
}
@@ -75,7 +75,7 @@ class CI_DB_interbase_forge extends CI_DB_forge {
* @param boolean should 'IF NOT EXISTS' be added to the SQL
* @return string
*/
- 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 ';
@@ -171,7 +171,7 @@ class CI_DB_interbase_forge extends CI_DB_forge {
*
* @return string
*/
- public function _drop_table($table)
+ protected function _drop_table($table)
{
return 'DROP TABLE '.$name;
}
@@ -193,7 +193,7 @@ class CI_DB_interbase_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);
@@ -233,7 +233,7 @@ class CI_DB_interbase_forge extends CI_DB_forge {
* @param string the new table name
* @return string
*/
- public function _rename_table($table_name, $new_table_name)
+ protected 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);
}
diff --git a/system/database/drivers/interbase/interbase_result.php b/system/database/drivers/interbase/interbase_result.php
index e1332ba93..7a3a41f2c 100644
--- a/system/database/drivers/interbase/interbase_result.php
+++ b/system/database/drivers/interbase/interbase_result.php
@@ -144,7 +144,7 @@ class CI_DB_interbase_result extends CI_DB_result {
*
* @return array
*/
- public function _data_seek($n = 0)
+ protected function _data_seek($n = 0)
{
//Set the row count to 0
$this->num_rows = 0;
@@ -162,7 +162,7 @@ class CI_DB_interbase_result extends CI_DB_result {
*
* @return array
*/
- public function _fetch_assoc()
+ protected function _fetch_assoc()
{
//Increment row count
$this->num_rows++;
@@ -179,7 +179,7 @@ class CI_DB_interbase_result extends CI_DB_result {
*
* @return object
*/
- public function _fetch_object()
+ protected function _fetch_object()
{
//Increment row count
$this->num_rows++;