My Project
 All Data Structures Namespaces Functions Variables
Public Member Functions | Data Fields | Protected Member Functions
CI_DB_oci8_driver Class Reference
Inheritance diagram for CI_DB_oci8_driver:

Public Member Functions

 db_connect ()
 
 db_pconnect ()
 
 reconnect ()
 
 db_select ()
 
 db_set_charset ($charset, $collation)
 
 get_cursor ()
 
 stored_procedure ($package, $procedure, $params)
 
 trans_begin ($test_mode=FALSE)
 
 trans_commit ()
 
 trans_rollback ()
 
 escape_str ($str, $like=FALSE)
 
 affected_rows ()
 
 insert_id ()
 
 count_all ($table= '')
 

Data Fields

 $dbdriver = 'oci8'
 
 $_escape_char = '"'
 
 $_like_escape_str = " escape '%s' "
 
 $_like_escape_chr = '!'
 
 $_count_string = "SELECT COUNT(1) AS "
 
 $_random_keyword = ' ASC'
 
 $_commit = OCI_COMMIT_ON_SUCCESS
 
 $stmt_id
 
 $curs_id
 
 $limit_used
 

Protected Member Functions

 _version ()
 
 _execute ($sql)
 
 _list_tables ($prefix_limit=FALSE)
 
 _list_columns ($table= '')
 
 _field_data ($table)
 
 _error_message ()
 
 _error_number ()
 
 _escape_identifiers ($item)
 
 _from_tables ($tables)
 
 _insert ($table, $keys, $values)
 
 _insert_batch ($table, $keys, $values)
 
 _update ($table, $values, $where, $orderby=array(), $limit=FALSE)
 
 _truncate ($table)
 
 _delete ($table, $where=array(), $like=array(), $limit=FALSE)
 
 _limit ($sql, $limit, $offset)
 
 _close ($conn_id)
 

Detailed Description

oci8 Database Adapter Class

This is a modification of the DB_driver class to permit access to oracle databases

Author
Kelly McArdle

Member Function Documentation

_close (   $conn_id)
protected

Close DB Connection

protected

Parameters
resource
Returns
void
_delete (   $table,
  $where = array(),
  $like = array(),
  $limit = FALSE 
)
protected

Delete statement

Generates a platform-specific delete string from the supplied data

protected

Parameters
stringthe table name
arraythe where clause
stringthe limit clause
Returns
string
_error_message ( )
protected

The error message string

protected

Returns
string
_error_number ( )
protected

The error message number

protected

Returns
integer
_escape_identifiers (   $item)
protected

Escape the SQL Identifiers

This function escapes column and table names

protected

Parameters
string
Returns
string
_execute (   $sql)
protected

Execute the query

protected called by the base class

Parameters
stringan SQL query
Returns
resource
_field_data (   $table)
protected

Field data query

Generates a platform-specific query so that the column data can be retrieved

public

Parameters
stringthe table name
Returns
object
_from_tables (   $tables)
protected

From Tables

This function implicitly groups FROM tables so there is no confusion about operator precedence in harmony with SQL standards

protected

Parameters
type
Returns
type
_insert (   $table,
  $keys,
  $values 
)
protected

Insert statement

Generates a platform-specific insert string from the supplied data

public

Parameters
stringthe table name
arraythe insert keys
arraythe insert values
Returns
string
_insert_batch (   $table,
  $keys,
  $values 
)
protected

Insert_batch statement

Generates a platform-specific insert string from the supplied data

protected

Parameters
stringthe table name
arraythe insert keys
arraythe insert values
Returns
string
_limit (   $sql,
  $limit,
  $offset 
)
protected

Limit string

Generates a platform-specific LIMIT clause

protected

Parameters
stringthe sql query string
integerthe number of rows to limit the query to
integerthe offset value
Returns
string
_list_columns (   $table = '')
protected

Show column query

Generates a platform-specific query string so that the column names can be fetched

protected

Parameters
stringthe table name
Returns
string
_list_tables (   $prefix_limit = FALSE)
protected

Show table query

Generates a platform-specific query string so that the table names can be fetched

protected

Parameters
boolean
Returns
string
_truncate (   $table)
protected

Truncate statement

Generates a platform-specific truncate string from the supplied data If the database does not support the truncate() command This function maps to "DELETE FROM table"

protected

Parameters
stringthe table name
Returns
string
_update (   $table,
  $values,
  $where,
  $orderby = array(),
  $limit = FALSE 
)
protected

Update statement

Generates a platform-specific update string from the supplied data

protected

Parameters
stringthe table name
arraythe update data
arraythe where clause
arraythe orderby clause
arraythe limit clause
Returns
string
_version ( )
protected

Version number query string

protected

Returns
string
affected_rows ( )

Affected Rows

public

Returns
integer
count_all (   $table = '')

"Count All" query

Generates a platform-specific query string that counts all records in the specified database

public

Parameters
string
Returns
string
db_connect ( )

Non-persistent database connection

private called by the base class

Returns
resource
db_pconnect ( )

Persistent database connection

private called by the base class

Returns
resource
db_select ( )

Select the database

private called by the base class

Returns
resource
db_set_charset (   $charset,
  $collation 
)

Set client character set

public

Parameters
string
string
Returns
resource
escape_str (   $str,
  $like = FALSE 
)

Escape String

public

Parameters
string
boolwhether or not the string will be used in a LIKE condition
Returns
string
get_cursor ( )

getCursor. Returns a cursor from the datbase

public

Returns
cursor id
insert_id ( )

Insert ID

public

Returns
integer
reconnect ( )

Reconnect

Keep / reestablish the db connection if no queries have been sent for a length of time exceeding the server's idle timeout

public

Returns
void
stored_procedure (   $package,
  $procedure,
  $params 
)

Stored Procedure. Executes a stored procedure

public

Parameters
packagepackage stored procedure is in
procedurestored procedure to execute
paramsarray of parameters
Returns
array

params array keys

KEY OPTIONAL NOTES name no the name of the parameter should be in :<param_name> format value no the value of the parameter. If this is an OUT or IN OUT parameter, this should be a reference to a variable type yes the type of the parameter length yes the max size of the parameter

trans_begin (   $test_mode = FALSE)

Begin Transaction

public

Returns
bool
trans_commit ( )

Commit Transaction

public

Returns
bool
trans_rollback ( )

Rollback Transaction

public

Returns
bool

Field Documentation

$_count_string = "SELECT COUNT(1) AS "

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.


The documentation for this class was generated from the following file: