ADODB_oci8 Class Reference

Inheritance diagram for ADODB_oci8:

Inheritance graph
[legend]
Collaboration diagram for ADODB_oci8:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ADODB_oci8 ()
MetaColumns ($table)
 Time ()
 _connect ($argHostname, $argUsername, $argPassword, $argDatabasename, $mode=0)
 ServerInfo ()
 _pconnect ($argHostname, $argUsername, $argPassword, $argDatabasename)
 _nconnect ($argHostname, $argUsername, $argPassword, $argDatabasename)
 _affectedrows ()
 IfNull ($field, $ifNull)
 DBDate ($d)
 BindDate ($d)
 BindTimeStamp ($d)
 DBTimeStamp ($ts)
 RowLock ($tables, $where, $flds='1 as ignore')
MetaTables ($ttype=false, $showSchema=false, $mask=false)
MetaIndexes ($table, $primary=FALSE, $owner=false)
 BeginTrans ()
 CommitTrans ($ok=true)
 RollbackTrans ()
 SelectDB ($dbName)
 ErrorMsg ()
 ErrorNo ()
 SQLDate ($fmt, $col=false)
SelectLimit ($sql, $nrows=-1, $offset=-1, $inputarr=false, $secs2cache=0)
 UpdateBlob ($table, $column, $val, $where, $blobtype='BLOB')
 UpdateBlobFile ($table, $column, $val, $where, $blobtype='BLOB')
Execute ($sql, $inputarr=false)
 Prepare ($sql, $cursor=false)
ExecuteCursor ($sql, $cursorName='rs', $params=false)
 Bind (&$stmt, &$var, $size=4000, $type=false, $name=false, $isOutput=false)
 Param ($name, $type=false)
 Parameter (&$stmt, &$var, $name, $isOutput=false, $maxLen=4000, $type=false)
 _query ($sql, $inputarr)
 _close ()
 MetaPrimaryKeys ($table, $owner=false, $internalKey=false)
 MetaForeignKeys ($table, $owner=false)
 CharMax ()
 TextMax ()
 qstr ($s, $magic_quotes=false)

Public Attributes

 $databaseType = 'oci8'
 $dataProvider = 'oci8'
 $replaceQuote = "''"
 string that represents FALSE for a database
 $concat_operator = '||'
 maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro
 $sysDate = "TRUNC(SYSDATE)"
 Use 'true' to store the item compressed (uses zlib).
 $sysTimeStamp = 'SYSDATE'
 name of function that returns the current date
 $metaDatabasesSQL = "SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1"
 character set to use - only for interbase, postgres and oci8
 $_stmt
 $_commit = OCI_COMMIT_ON_SUCCESS
 $_initdate = true
 $metaTablesSQL = "select table_name,table_type from cat where table_type in ('TABLE','VIEW') and table_name not like 'BIN\$%'"
 $metaColumnsSQL = "select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"
 $_bindInputArray = true
 A boolean variable to state whether its a persistent connection or normal connection. */.
 $hasGenID = true
 has ability to run MoveFirst(), scrolling backwards
 $_genIDSQL = "SELECT (%s.nextval) FROM DUAL"
 $_genSeqSQL = "CREATE SEQUENCE %s START WITH %s"
 $_dropSeqSQL = "DROP SEQUENCE %s"
 $hasAffectedRows = true
 supports autoincrement ID?
 $random = "abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)"
 string length ofperator
 $noNullStrings = false
 name of class used to generate array recordsets, which are pre-downloaded recordsets
 $connectSID = false
 $_bind = false
 $_nestedSQL = true
 $_hasOCIFetchStatement = false
 $_getarray = false
 $leftOuter = ''
 indicates that all fields in order by must be unique
 $session_sharing_force_blob = false
 $firstrows = true
 $selectOffsetAlg1 = 100
 $NLS_DATE_FORMAT = 'YYYY-MM-DD'
 $useDBDateFormatForTextInput = false
 $datetime = false
 $_refLOBs = array()


Detailed Description

Definition at line 55 of file adodb-oci8.inc.php.


Member Function Documentation

ADODB_oci8.ADODB_oci8 (  ) 

Definition at line 92 of file adodb-oci8.inc.php.

Referenced by ADODB_oci805.ADODB_oci805().

& ADODB_oci8.MetaColumns ( table  ) 

Definition at line 99 of file adodb-oci8.inc.php.

References $ADODB_FETCH_MODE, ADOConnection.$false, $rs, Execute(), and ADOConnection.SetFetchMode().

Here is the call graph for this function:

ADODB_oci8.Time (  ) 

Reimplemented from ADOConnection.

Definition at line 141 of file adodb-oci8.inc.php.

References $rs, Execute(), and ADOConnection.UnixTimeStamp().

Here is the call graph for this function:

ADODB_oci8._connect ( argHostname,
argUsername,
argPassword,
argDatabasename,
mode = 0 
)

Definition at line 183 of file adodb-oci8.inc.php.

References Execute().

Referenced by _nconnect(), and _pconnect().

Here is the call graph for this function:

ADODB_oci8.ServerInfo (  ) 

Get server version info...

Returns:
An array with 2 elements: $arr['string'] is the description string, and $arr[version] is the version (also a string).

Reimplemented from ADOConnection.

Definition at line 243 of file adodb-oci8.inc.php.

References $arr, ADOConnection._findvers(), and ADOConnection.GetOne().

Here is the call graph for this function:

ADODB_oci8._pconnect ( argHostname,
argUsername,
argPassword,
argDatabasename 
)

Definition at line 251 of file adodb-oci8.inc.php.

References _connect().

Here is the call graph for this function:

ADODB_oci8._nconnect ( argHostname,
argUsername,
argPassword,
argDatabasename 
)

Reimplemented from ADOConnection.

Definition at line 257 of file adodb-oci8.inc.php.

References _connect().

Here is the call graph for this function:

ADODB_oci8._affectedrows (  ) 

Definition at line 262 of file adodb-oci8.inc.php.

ADODB_oci8.IfNull ( field,
ifNull 
)

Reimplemented from ADOConnection.

Definition at line 268 of file adodb-oci8.inc.php.

ADODB_oci8.DBDate ( d  ) 

Converts a date "d" to a string that the database can understand.

Parameters:
d a date in Unix date time format.
Returns:
date string in database date format

Reimplemented from ADOConnection.

Definition at line 274 of file adodb-oci8.inc.php.

References ADORecordSet.UnixDate().

Here is the call graph for this function:

ADODB_oci8.BindDate ( d  ) 

Reimplemented from ADOConnection.

Definition at line 282 of file adodb-oci8.inc.php.

References ADOConnection.DBDate().

Here is the call graph for this function:

ADODB_oci8.BindTimeStamp ( d  ) 

Reimplemented from ADOConnection.

Definition at line 290 of file adodb-oci8.inc.php.

References ADOConnection.DBTimeStamp().

Here is the call graph for this function:

ADODB_oci8.DBTimeStamp ( ts  ) 

Converts a timestamp "ts" to a string that the database can understand.

Parameters:
ts a timestamp in Unix date time format.
Returns:
timestamp string in database timestamp format

Reimplemented from ADOConnection.

Definition at line 299 of file adodb-oci8.inc.php.

References ADORecordSet.UnixTimeStamp().

Here is the call graph for this function:

ADODB_oci8.RowLock ( tables,
where,
flds = '1 as ignore' 
)

Definition at line 306 of file adodb-oci8.inc.php.

References BeginTrans(), and ADOConnection.GetOne().

Here is the call graph for this function:

& ADODB_oci8.MetaTables ( ttype = false,
showSchema = false,
mask = false 
)

Parameters:
ttype can either be 'VIEW' or 'TABLE' or false. If false, both views and tables are returned. "VIEW" returns only views "TABLE" returns only tables
showSchema returns the schema/user with the table name, eg. USER.TABLE
mask is the input mask - only supported by oci8 and postgresql
Returns:
array of tables for current database.

Reimplemented from ADOConnection.

Definition at line 312 of file adodb-oci8.inc.php.

References ADOConnection.MetaTables(), and qstr().

Here is the call graph for this function:

& ADODB_oci8.MetaIndexes ( table,
primary = FALSE,
owner = false 
)

List indexes on a table as an array.

Parameters:
table table name to query
primary true to only show primary keys. Not actually used for most databases
Returns:
array of indexes on current table. Each element represents an index, and is itself an associative array.
Array ( [name_of_index] => Array ( [unique] => true or false [columns] => Array ( [0] => firstname [1] => lastname ) )

Reimplemented from ADOConnection.

Definition at line 328 of file adodb-oci8.inc.php.

References $ADODB_FETCH_MODE, ADOConnection.$false, $row, $rs, Execute(), and ADOConnection.SetFetchMode().

Here is the call graph for this function:

ADODB_oci8.BeginTrans (  ) 

Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().

Returns:
true if succeeded or false if database does not support transactions

Reimplemented from ADOConnection.

Definition at line 394 of file adodb-oci8.inc.php.

References Execute().

Referenced by RowLock(), UpdateBlob(), and UpdateBlobFile().

Here is the call graph for this function:

ADODB_oci8.CommitTrans ( ok = true  ) 

If database does not support transactions, always return true as data always commited

Parameters:
$ok set to false to rollback transaction, true to commit
Returns:
true/false.

Reimplemented from ADOConnection.

Definition at line 405 of file adodb-oci8.inc.php.

References $ok, and RollbackTrans().

Referenced by UpdateBlob(), and UpdateBlobFile().

Here is the call graph for this function:

ADODB_oci8.RollbackTrans (  ) 

If database does not support transactions, rollbacks always fail, so return false

Returns:
true/false.

Reimplemented from ADOConnection.

Definition at line 417 of file adodb-oci8.inc.php.

Referenced by CommitTrans().

ADODB_oci8.SelectDB ( dbName  ) 

Choose a database to connect to. Many databases do not support this.

Parameters:
dbName is the name of the database to select
Returns:
true or false

Reimplemented from ADOConnection.

Definition at line 428 of file adodb-oci8.inc.php.

ADODB_oci8.ErrorMsg (  ) 

Returns:
the last error message

Reimplemented from ADOConnection.

Definition at line 433 of file adodb-oci8.inc.php.

References $arr.

ADODB_oci8.ErrorNo (  ) 

Returns:
the last error number. Normally 0 means no error.

Reimplemented from ADOConnection.

Definition at line 448 of file adodb-oci8.inc.php.

References $arr.

ADODB_oci8.SQLDate ( fmt,
col = false 
)

Reimplemented from ADOConnection.

Definition at line 466 of file adodb-oci8.inc.php.

References $s.

& ADODB_oci8.SelectLimit ( sql,
nrows = -1,
offset = -1,
inputarr = false,
secs2cache = 0 
)

Will select, getting rows from $offset (1-based), for $nrows. This simulates the MySQL "select * from table limit $offset,$nrows" , and the PostgreSQL "select * from table limit $nrows offset $offset". Note that MySQL and PostgreSQL parameter ordering is the opposite of the other. eg. SelectLimit('select * from table',3); will return rows 1 to 3 (1-based) SelectLimit('select * from table',3,2); will return rows 3 to 5 (1-based)

Uses SELECT TOP for Microsoft databases (when $this->hasTop is set) BUG: Currently SelectLimit fails with $sql with LIMIT or TOP clause already set

Parameters:
sql 
[offset] is the row to start calculations from (1-based)
[nrows] is the number of rows to get
[inputarr] array of bind variables
[secs2cache] is a private parameter only used by jlim
Returns:
the recordset ($rs->databaseType == 'array')

Reimplemented from ADOConnection.

Reimplemented in ADODB_oci805.

Definition at line 559 of file adodb-oci8.inc.php.

References ADOConnection.$false, $rs, $sql, $stmt, $v, ADOConnection.CacheExecute(), Execute(), Prepare(), and ADOConnection.SelectLimit().

Here is the call graph for this function:

ADODB_oci8.UpdateBlob ( table,
column,
val,
where,
blobtype = 'BLOB' 
)

Usage: Store BLOBs and CLOBs

Example: to store $var in a blob

$conn->Execute('insert into TABLE (id,ablob) values(12,empty_blob())'); $conn->UpdateBlob('TABLE', 'ablob', $varHoldingBlob, 'ID=12', 'BLOB');

$blobtype supports 'BLOB' and 'CLOB', but you need to change to 'empty_clob()'.

to get length of LOB: select DBMS_LOB.GETLENGTH(ablob) from TABLE

If you are using CURSOR_SHARING = force, it appears this will case a segfault under oracle 8.1.7.0. Run: $db->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT'); before UpdateBlob() then...

Reimplemented from ADOConnection.

Definition at line 674 of file adodb-oci8.inc.php.

References $arr, $rez, $rs, $sql, $val, ADOConnection._Execute(), BeginTrans(), CommitTrans(), Execute(), and ADOConnection.outp().

Here is the call graph for this function:

ADODB_oci8.UpdateBlobFile ( table,
column,
val,
where,
blobtype = 'BLOB' 
)

Usage: store file pointed to by $var in a blob

Reimplemented from ADOConnection.

Definition at line 708 of file adodb-oci8.inc.php.

References $arr, $rez, $rs, $sql, $val, BeginTrans(), CommitTrans(), Execute(), and ADOConnection.outp().

Here is the call graph for this function:

& ADODB_oci8.Execute ( sql,
inputarr = false 
)

Execute SQL

Parameters:
sql SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text)
[inputarr] holds the input data to bind to. Null elements will be set to null.
Returns:
RecordSet or false

Reimplemented from ADOConnection.

Definition at line 741 of file adodb-oci8.inc.php.

References $arr, $sql, $stmt, ADOConnection._Execute(), and Prepare().

Referenced by _connect(), BeginTrans(), ExecuteCursor(), MetaColumns(), MetaIndexes(), MetaPrimaryKeys(), SelectLimit(), Time(), UpdateBlob(), and UpdateBlobFile().

Here is the call graph for this function:

ADODB_oci8.Prepare ( sql,
cursor = false 
)

Reimplemented in ADODB_oci8po.

Definition at line 780 of file adodb-oci8.inc.php.

References $sql, and $stmt.

Referenced by Execute(), ExecuteCursor(), ADODB_oci8po.Prepare(), and SelectLimit().

& ADODB_oci8.ExecuteCursor ( sql,
cursorName = 'rs',
params = false 
)

Definition at line 811 of file adodb-oci8.inc.php.

References $rs, $sql, $stmt, $v, Execute(), Parameter(), and Prepare().

Here is the call graph for this function:

ADODB_oci8.Bind ( &$  stmt,
&$  var,
size = 4000,
type = false,
name = false,
isOutput = false 
)

Definition at line 866 of file adodb-oci8.inc.php.

References $rez, $stmt, ADOConnection.BlobEncode(), debug, oci_lob_desc(), and ADOConnection.outp().

Referenced by Parameter().

Here is the call graph for this function:

ADODB_oci8.Param ( name,
type = false 
)

Reimplemented from ADOConnection.

Definition at line 917 of file adodb-oci8.inc.php.

ADODB_oci8.Parameter ( &$  stmt,
&$  var,
name,
isOutput = false,
maxLen = 4000,
type = false 
)

Reimplemented from ADOConnection.

Definition at line 938 of file adodb-oci8.inc.php.

References $stmt, Bind(), debug, and ADOConnection.outp().

Referenced by ExecuteCursor().

Here is the call graph for this function:

ADODB_oci8._query ( sql,
inputarr 
)

Reimplemented in ADODB_oci8po.

Definition at line 963 of file adodb-oci8.inc.php.

References $key, $ok, $sql, $stmt, $v, $value, debug, and ADOConnection.outp().

Referenced by ADODB_oci8po._query().

Here is the call graph for this function:

ADODB_oci8._close (  ) 

Definition at line 1070 of file adodb-oci8.inc.php.

References $key, and $value.

ADODB_oci8.MetaPrimaryKeys ( table,
owner = false,
internalKey = false 
)

Definition at line 1087 of file adodb-oci8.inc.php.

References $arr, $rs, $sql, $v, and Execute().

Here is the call graph for this function:

ADODB_oci8.MetaForeignKeys ( table,
owner = false 
)

Definition at line 1122 of file adodb-oci8.inc.php.

References $ADODB_FETCH_MODE, $arr, $sql, ADOConnection.GetArray(), and qstr().

Here is the call graph for this function:

ADODB_oci8.CharMax (  ) 

Definition at line 1162 of file adodb-oci8.inc.php.

ADODB_oci8.TextMax (  ) 

Definition at line 1167 of file adodb-oci8.inc.php.

ADODB_oci8.qstr ( s,
magic_quotes = false 
)

Quotes a string. An example is $db->qstr("Don't bother",magic_quotes_runtime());

Parameters:
s the string to quote
[magic_quotes] if $s is GET/POST var, set to get_magic_quotes_gpc(). This undoes the stupidity of magic quotes for GPC.
Returns:
quoted string to be sent back to database

Reimplemented from ADOConnection.

Definition at line 1182 of file adodb-oci8.inc.php.

References $s.

Referenced by MetaForeignKeys(), and MetaTables().


Member Data Documentation

ADODB_oci8.$databaseType = 'oci8'

Reimplemented from ADOConnection.

Reimplemented in ADODB_oci805, and ADODB_oci8po.

Definition at line 56 of file adodb-oci8.inc.php.

ADODB_oci8.$dataProvider = 'oci8'

Reimplemented from ADOConnection.

Reimplemented in ADODB_oci8po.

Definition at line 57 of file adodb-oci8.inc.php.

ADODB_oci8.$replaceQuote = "''"

string that represents FALSE for a database

Reimplemented from ADOConnection.

Definition at line 58 of file adodb-oci8.inc.php.

ADODB_oci8.$concat_operator = '||'

maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro

Reimplemented from ADOConnection.

Definition at line 59 of file adodb-oci8.inc.php.

ADODB_oci8.$sysDate = "TRUNC(SYSDATE)"

Use 'true' to store the item compressed (uses zlib).

Reimplemented from ADOConnection.

Definition at line 60 of file adodb-oci8.inc.php.

ADODB_oci8.$sysTimeStamp = 'SYSDATE'

name of function that returns the current date

Reimplemented from ADOConnection.

Definition at line 61 of file adodb-oci8.inc.php.

ADODB_oci8.$metaDatabasesSQL = "SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1"

character set to use - only for interbase, postgres and oci8

Reimplemented from ADOConnection.

Definition at line 62 of file adodb-oci8.inc.php.

ADODB_oci8.$_stmt

Definition at line 63 of file adodb-oci8.inc.php.

ADODB_oci8.$_commit = OCI_COMMIT_ON_SUCCESS

Definition at line 64 of file adodb-oci8.inc.php.

ADODB_oci8.$_initdate = true

Definition at line 65 of file adodb-oci8.inc.php.

ADODB_oci8.$metaTablesSQL = "select table_name,table_type from cat where table_type in ('TABLE','VIEW') and table_name not like 'BIN\$%'"

Reimplemented from ADOConnection.

Reimplemented in ADODB_oci8po.

Definition at line 66 of file adodb-oci8.inc.php.

ADODB_oci8.$metaColumnsSQL = "select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"

Reimplemented in ADODB_oci8po.

Definition at line 67 of file adodb-oci8.inc.php.

ADODB_oci8.$_bindInputArray = true

A boolean variable to state whether its a persistent connection or normal connection. */.

Reimplemented from ADOConnection.

Definition at line 68 of file adodb-oci8.inc.php.

ADODB_oci8.$hasGenID = true

has ability to run MoveFirst(), scrolling backwards

Reimplemented from ADOConnection.

Definition at line 69 of file adodb-oci8.inc.php.

ADODB_oci8.$_genIDSQL = "SELECT (%s.nextval) FROM DUAL"

Definition at line 70 of file adodb-oci8.inc.php.

ADODB_oci8.$_genSeqSQL = "CREATE SEQUENCE %s START WITH %s"

Definition at line 71 of file adodb-oci8.inc.php.

ADODB_oci8.$_dropSeqSQL = "DROP SEQUENCE %s"

Definition at line 72 of file adodb-oci8.inc.php.

ADODB_oci8.$hasAffectedRows = true

supports autoincrement ID?

Reimplemented from ADOConnection.

Definition at line 73 of file adodb-oci8.inc.php.

ADODB_oci8.$random = "abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)"

string length ofperator

Reimplemented from ADOConnection.

Definition at line 74 of file adodb-oci8.inc.php.

ADODB_oci8.$noNullStrings = false

name of class used to generate array recordsets, which are pre-downloaded recordsets

Reimplemented from ADOConnection.

Definition at line 75 of file adodb-oci8.inc.php.

ADODB_oci8.$connectSID = false

Reimplemented in ADODB_oci805.

Definition at line 76 of file adodb-oci8.inc.php.

ADODB_oci8.$_bind = false

Definition at line 77 of file adodb-oci8.inc.php.

ADODB_oci8.$_nestedSQL = true

Definition at line 78 of file adodb-oci8.inc.php.

ADODB_oci8.$_hasOCIFetchStatement = false

Definition at line 79 of file adodb-oci8.inc.php.

ADODB_oci8.$_getarray = false

Definition at line 80 of file adodb-oci8.inc.php.

ADODB_oci8.$leftOuter = ''

indicates that all fields in order by must be unique

Reimplemented from ADOConnection.

Definition at line 81 of file adodb-oci8.inc.php.

ADODB_oci8.$session_sharing_force_blob = false

Definition at line 82 of file adodb-oci8.inc.php.

ADODB_oci8.$firstrows = true

Definition at line 83 of file adodb-oci8.inc.php.

ADODB_oci8.$selectOffsetAlg1 = 100

Definition at line 84 of file adodb-oci8.inc.php.

ADODB_oci8.$NLS_DATE_FORMAT = 'YYYY-MM-DD'

Definition at line 85 of file adodb-oci8.inc.php.

ADODB_oci8.$useDBDateFormatForTextInput = false

Definition at line 86 of file adodb-oci8.inc.php.

ADODB_oci8.$datetime = false

Definition at line 87 of file adodb-oci8.inc.php.

ADODB_oci8.$_refLOBs = array()

Definition at line 88 of file adodb-oci8.inc.php.


The documentation for this class was generated from the following file:
This documentation is part of typo3-unleashed.net.
It's an automatically created code documentation of the TYPO3 Content Management System.
Created with doxygen