Zikula 1.0.1
[ class tree: Zikula 1.0.1 ] [ index: Zikula 1.0.1 ] [ all elements ]

Class: ADODB_oci8

Source Location: /includes/classes/adodb/drivers/adodb-oci8.inc.php

Class Overview

ADOConnection
   |
   --ADODB_oci8

Connection object. For connecting to databases, and executing queries.


Variables

Methods


Child classes:

ADODB_oci8po
Connection object. For connecting to databases, and executing queries.
ADODB_oci805
Connection object. For connecting to databases, and executing queries.

Inherited Variables

Class: ADOConnection

ADOConnection::$ansiOuter
ADOConnection::$arrayClass
ADOConnection::$autoCommit
ADOConnection::$autoRollback
ADOConnection::$blobEncodeType
ADOConnection::$cacheSecs
ADOConnection::$charSet
ADOConnection::$database
ADOConnection::$debug
ADOConnection::$emptyDate
ADOConnection::$emptyTimeStamp
ADOConnection::$false
ADOConnection::$fetchMode
ADOConnection::$fmtDate
ADOConnection::$fmtTimeStamp
ADOConnection::$fnCacheExecute
ADOConnection::$fnExecute
ADOConnection::$genID
ADOConnection::$hasInsertID
ADOConnection::$hasLimit
ADOConnection::$hasMoveFirst
ADOConnection::$hasTop
ADOConnection::$hasTransactions
ADOConnection::$host
ADOConnection::$isoDates
ADOConnection::$lastInsID
ADOConnection::$length
ADOConnection::$maxblobsize
ADOConnection::$memCache
ADOConnection::$memCacheCompress
ADOConnection::$memCacheHost
ADOConnection::$memCachePort
ADOConnection::$nameQuote
ADOConnection::$null2null
ADOConnection::$numCacheHits
ADOConnection::$numCacheMisses
ADOConnection::$pageExecuteCountRows
ADOConnection::$password
ADOConnection::$poorAffectedRows
ADOConnection::$raiseErrorFn
ADOConnection::$readOnly
ADOConnection::$rightOuter
ADOConnection::$rsPrefix
ADOConnection::$substr
ADOConnection::$transCnt
ADOConnection::$transOff
ADOConnection::$true
ADOConnection::$uniqueOrderBy
ADOConnection::$uniqueSort
ADOConnection::$upperCase
ADOConnection::$user
ADOConnection::$_affected
ADOConnection::$_connectionID
ADOConnection::$_errorCode
ADOConnection::$_errorMsg
ADOConnection::$_evalAll
ADOConnection::$_isPersistentConnection
ADOConnection::$_logsql
ADOConnection::$_oldRaiseFn
ADOConnection::$_queryID
ADOConnection::$_transmode
ADOConnection::$_transOK

Inherited Methods

Class: ADOConnection

ADOConnection::ADOConnection()
Constructor
ADOConnection::addq()
Quotes a string, without prefixing nor appending quotes.
ADOConnection::Affected_Rows()
ADOConnection::AutoExecute()
ADOConnection::BeginTrans()
Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().
ADOConnection::BindDate()
ADOConnection::BindTimeStamp()
ADOConnection::BlobDecode()
ADOConnection::BlobEncode()
ADOConnection::CacheExecute()
Execute SQL, caching recordsets.
ADOConnection::CacheFlush()
Flush cached recordsets that match a particular $sql statement.
ADOConnection::CacheGetAll()
ADOConnection::CacheGetArray()
ADOConnection::CacheGetAssoc()
ADOConnection::CacheGetCol()
ADOConnection::CacheGetOne()
ADOConnection::CacheGetRow()
ADOConnection::CachePageExecute()
Will select the supplied $page number from a recordset, given that it is paginated in pages of $nrows rows per page. It also saves two boolean values saying if the given page is the first and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination.
ADOConnection::CacheSelectLimit()
Will select, getting rows from $offset (1-based), for $nrows.
ADOConnection::Close()
Close Connection
ADOConnection::CommitLock()
ADOConnection::CommitTrans()
If database does not support transactions, always return true as data always commited
ADOConnection::CompleteTrans()
ADOConnection::Concat()
Different SQL databases used different methods to combine strings together.
ADOConnection::Connect()
Connect to database
ADOConnection::CreateSequence()
ADOConnection::DBDate()
Converts a date "d" to a string that the database can understand.
ADOConnection::DBTimeStamp()
Converts a timestamp "ts" to a string that the database can understand.
ADOConnection::Disconnect()
PEAR DB Compat - do not use internally
ADOConnection::DropSequence()
ADOConnection::ErrorMsg()
ADOConnection::ErrorNative()
PEAR DB Compat - do not use internally.
ADOConnection::ErrorNo()
ADOConnection::escape()
ADOConnection::Execute()
Execute SQL
ADOConnection::FailTrans()
ADOConnection::GenID()
Generates a sequence id and stores it in $this->genID; GenID is only available if $this->hasGenID = true;
ADOConnection::GetActiveRecords()
ADOConnection::GetActiveRecordsClass()
ADOConnection::GetAll()
ADOConnection::GetArray()
ADOConnection::GetAssoc()
ADOConnection::GetCharSet()
ADOConnection::GetCol()
ADOConnection::GetInsertSQL()
Generates an Insert Query based on an existing recordset.
ADOConnection::GetOne()
Return first element of first row of sql statement. Recordset is disposed for you.
ADOConnection::GetRandRow()
ADOConnection::GetRow()
Return one row of sql statement. Recordset is disposed for you.
ADOConnection::GetUpdateSQL()
Generates an Update Query based on an existing recordset.
ADOConnection::HasFailedTrans()
ADOConnection::IfNull()
ADOConnection::IgnoreErrors()
ADOConnection::InParameter()
ADOConnection::Insert_ID()
ADOConnection::IsConnected()
ADOConnection::LimitQuery()
PEAR DB Compat - do not use internally
ADOConnection::LogSQL()
ADOConnection::MetaColumnNames()
List columns names in a table as an array.
ADOConnection::MetaColumns()
List columns in a database as an array of ADOFieldObjects.
ADOConnection::MetaDatabases()
return the databases that the driver can connect to.
ADOConnection::MetaError()
ADOConnection::MetaErrorMsg()
ADOConnection::MetaForeignKeys()
ADOConnection::MetaIndexes()
List indexes on a table as an array.
ADOConnection::MetaPrimaryKeys()
ADOConnection::MetaTables()
ADOConnection::MetaTransaction()
ADOConnection::MetaType()
ADOConnection::NConnect()
Always force a new connection to database - currently only works with oracle
ADOConnection::nextId()
PEAR DB Compat - do not use internally.
ADOConnection::OffsetDate()
ADOConnection::outp()
All error messages go through this bottleneck function.
ADOConnection::OutParameter()
ADOConnection::PageExecute()
Will select the supplied $page number from a recordset, given that it is paginated in pages of $nrows rows per page. It also saves two boolean values saying if the given page is the first and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination.
ADOConnection::Param()
ADOConnection::Parameter()
ADOConnection::PConnect()
Establish persistent connect to database
ADOConnection::PO_Insert_ID()
Portable Insert ID. Pablo Roca <pabloroca#mvps.org>
ADOConnection::Prepare()
Should prepare the sql statement and return the stmt resource.
ADOConnection::PrepareSP()
Some databases, eg. mssql require a different function for preparing stored procedures. So we cannot use Prepare().
ADOConnection::q()
ADOConnection::QMagic()
ADOConnection::qstr()
Correctly quotes a string so that all strings are escaped. We prefix and append to the string single-quotes.
ADOConnection::Query()
PEAR DB Compat - do not use internally.
ADOConnection::Quote()
PEAR DB Compat
ADOConnection::Replace()
Insert or replace a single record. Note: this is not the same as MySQL's replace.
ADOConnection::RollbackLock()
ADOConnection::RollbackTrans()
If database does not support transactions, rollbacks always fail, so return false
ADOConnection::RowLock()
Lock a row, will escalate and lock the table if row locking not supported will normally free the lock at the end of the transaction
ADOConnection::SelectDB()
Choose a database to connect to. Many databases do not support this.
ADOConnection::SelectLimit()
Will select, getting rows from $offset (1-based), for $nrows.
ADOConnection::SerializableRS()
Create serializable recordset. Breaks rs link to connection.
ADOConnection::ServerInfo()
ADOConnection::SetCharSet()
ADOConnection::SetDateLocale()
Change the SQL connection locale to a specified locale.
ADOConnection::SetFetchMode()
PEAR DB Compat - do not use internally.
ADOConnection::SetTransactionMode()
ADOConnection::SQLDate()
ADOConnection::StartTrans()
ADOConnection::Time()
ADOConnection::Transpose()
ADOConnection::UnixDate()
Also in ADORecordSet.
ADOConnection::UnixTimeStamp()
Also in ADORecordSet.
ADOConnection::UpdateBlob()
Update a blob column, given a where clause. There are more sophisticated blob handling functions that we could have implemented, but all require a very complex API. Instead we have chosen something that is extremely simple to understand and use.
ADOConnection::UpdateBlobFile()
Usage: UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1');
ADOConnection::UpdateClob()
Usage: UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB');
ADOConnection::UserDate()
Also in ADORecordSet.
ADOConnection::UserTimeStamp()
ADOConnection::Version()
ADOConnection::xCacheFlush()
ADOConnection::_dirFlush()
Private function to erase all of the files and subdirectories in a directory.
ADOConnection::_Execute()
ADOConnection::_findschema()
ADOConnection::_findvers()
ADOConnection::_gencachename()
Private function to generate filename for caching.
ADOConnection::_nconnect()
ADOConnection::_rs2rs()
Convert database recordset to an array recordset input recordset's cursor should be at beginning, and old $rs will be closed.

Class Details

[line 55]
Connection object. For connecting to databases, and executing queries.



[ Top ]


Class Variables

$concat_operator = '||'

[line 59]


Type:   mixed
Overrides:   Array


[ Top ]

$connectSID =  false

[line 76]


Type:   mixed


[ Top ]

$databaseType =  'oci8'

[line 56]


Type:   mixed
Overrides:   Array


[ Top ]

$dataProvider =  'oci8'

[line 57]


Type:   mixed
Overrides:   Array


[ Top ]

$dateformat =  'YYYY-MM-DD'

[line 86]


Type:   mixed


[ Top ]

$datetime =  false

[line 88]


Type:   mixed


[ Top ]

$firstrows =  true

[line 83]


Type:   mixed


[ Top ]

$hasAffectedRows =  true

[line 73]


Type:   mixed
Overrides:   Array


[ Top ]

$hasGenID =  true

[line 69]


Type:   mixed
Overrides:   Array


[ Top ]

$leftOuter =  ''

[line 81]


Type:   mixed
Overrides:   Array


[ Top ]

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

[line 67]


Type:   mixed


[ Top ]

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

[line 62]


Type:   mixed
Overrides:   Array


[ Top ]

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

[line 66]


Type:   mixed
Overrides:   Array


[ Top ]

$NLS_DATE_FORMAT =  'YYYY-MM-DD'

[line 85]


Type:   mixed


[ Top ]

$noNullStrings =  false

[line 75]


Type:   mixed
Overrides:   Array


[ Top ]

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

[line 74]


Type:   mixed
Overrides:   Array


[ Top ]

$replaceQuote =  "''"

[line 58]


Type:   mixed
Overrides:   Array


[ Top ]

$selectOffsetAlg1 =  100

[line 84]


Type:   mixed


[ Top ]

$session_sharing_force_blob =  false

[line 82]


Type:   mixed


[ Top ]

$sysDate =  "TRUNC(SYSDATE)"

[line 60]


Type:   mixed
Overrides:   Array


[ Top ]

$sysTimeStamp =  'SYSDATE'

[line 61]


Type:   mixed
Overrides:   Array


[ Top ]

$useDBDateFormatForTextInput = false

[line 87]


Type:   mixed


[ Top ]

$_bind =  false

[line 77]


Type:   mixed


[ Top ]

$_bindInputArray =  true

[line 68]


Type:   mixed
Overrides:   Array


[ Top ]

$_commit =  OCI_COMMIT_ON_SUCCESS

[line 64]


Type:   mixed


[ Top ]

$_dropSeqSQL =  "DROP SEQUENCE %s"

[line 72]


Type:   mixed


[ Top ]

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

[line 70]


Type:   mixed


[ Top ]

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

[line 71]


Type:   mixed


[ Top ]

$_getarray =  false

[line 80]


Type:   mixed


[ Top ]

$_hasOCIFetchStatement =  false

[line 79]


Type:   mixed


[ Top ]

$_initdate =  true

[line 65]


Type:   mixed


[ Top ]

$_nestedSQL =  true

[line 78]


Type:   mixed


[ Top ]

$_refLOBs = array()

[line 89]


Type:   mixed


[ Top ]

$_stmt =

[line 63]


Type:   mixed


[ Top ]



Class Methods


constructor ADODB_oci8 [line 93]

ADODB_oci8 ADODB_oci8( )



[ Top ]

method BeginTrans [line 395]

void BeginTrans( )



Overrides ADOConnection::BeginTrans() (Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().)

[ Top ]

method Bind [line 881]

void Bind( &$stmt, &$var, [ $size = 4000], [ $type = false], [ $name = false], [ $isOutput = false])



Parameters:

   &$stmt  
   &$var  
   $size  
   $type  
   $name  
   $isOutput  

[ Top ]

method BindDate [line 283]

void BindDate( $d)



Overrides ADOConnection::BindDate() (parent method not documented)

Parameters:

   $d  

[ Top ]

method BindTimeStamp [line 291]

void BindTimeStamp( $d)



Overrides ADOConnection::BindTimeStamp() (parent method not documented)

Parameters:

   $d  

[ Top ]

method CharMax [line 1177]

void CharMax( )



[ Top ]

method CommitTrans [line 406]

void CommitTrans( [ $ok = true])



Overrides ADOConnection::CommitTrans() (If database does not support transactions, always return true as data always commited)

Parameters:

   $ok  

[ Top ]

method DBDate [line 275]

void DBDate( $d)



Overrides ADOConnection::DBDate() (Converts a date "d" to a string that the database can understand.)

Parameters:

   $d  

[ Top ]

method DBTimeStamp [line 300]

void DBTimeStamp( $ts)



Overrides ADOConnection::DBTimeStamp() (Converts a timestamp "ts" to a string that the database can understand.)

Parameters:

   $ts  

[ Top ]

method ErrorMsg [line 434]

void ErrorMsg( )



Overrides ADOConnection::ErrorMsg() (parent method not documented)

[ Top ]

method ErrorNo [line 449]

void ErrorNo( )



Overrides ADOConnection::ErrorNo() (parent method not documented)

[ Top ]

method Execute [line 748]

RecordSet &Execute( sql $sql, [[inputarr] $inputarr = false])

Execute SQL



Tags:

return:  or false


Overrides ADOConnection::Execute() (Execute SQL)

Parameters:

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

[ Top ]

method ExecuteCursor [line 826]

void &ExecuteCursor( $sql, [ $cursorName = 'rs'], [ $params = false])



Parameters:

   $sql  
   $cursorName  
   $params  

[ Top ]

method GetRandRow [line 544]

void GetRandRow( $sql, [ $arr = false])



Overrides ADOConnection::GetRandRow() (parent method not documented)

Parameters:

   $sql  
   $arr  

[ Top ]

method IfNull [line 269]

void IfNull( $field, $ifNull)



Overrides ADOConnection::IfNull() (parent method not documented)

Parameters:

   $field  
   $ifNull  

[ Top ]

method MetaColumns [line 100]

void &MetaColumns( $table)



Overrides ADOConnection::MetaColumns() (List columns in a database as an array of ADOFieldObjects.)

Parameters:

   $table  

[ Top ]

method MetaForeignKeys [line 1137]

void MetaForeignKeys( $table, [ $owner = false])



Overrides ADOConnection::MetaForeignKeys() (parent method not documented)

Parameters:

   $table  
   $owner  

[ Top ]

method MetaIndexes [line 329]

void &MetaIndexes( $table, [ $primary = FALSE], [ $owner = false])



Overrides ADOConnection::MetaIndexes() (List indexes on a table as an array.)

Parameters:

   $table  
   $primary  
   $owner  

[ Top ]

method MetaPrimaryKeys [line 1102]

void MetaPrimaryKeys( $table, [ $owner = false], [ $internalKey = false])



Overrides ADOConnection::MetaPrimaryKeys() (parent method not documented)

Parameters:

   $table  
   $owner  
   $internalKey  

[ Top ]

method MetaTables [line 313]

void &MetaTables( [ $ttype = false], [ $showSchema = false], [ $mask = false])



Overrides ADOConnection::MetaTables() (parent method not documented)

Parameters:

   $ttype  
   $showSchema  
   $mask  

[ Top ]

method Param [line 932]

void Param( $name, [ $type = false])



Overridden in child classes as:

ADODB_oci8po::Param()

Overrides ADOConnection::Param() (parent method not documented)

Parameters:

   $name  
   $type  

[ Top ]

method Parameter [line 953]

void Parameter( &$stmt, &$var, $name, [ $isOutput = false], [ $maxLen = 4000], [ $type = false])



Overrides ADOConnection::Parameter() (parent method not documented)

Parameters:

   &$stmt  
   &$var  
   $name  
   $isOutput  
   $maxLen  
   $type  

[ Top ]

method Prepare [line 786]

void Prepare( $sql, [ $cursor = false])



Overridden in child classes as:

ADODB_oci8po::Prepare()

Overrides ADOConnection::Prepare() (Should prepare the sql statement and return the stmt resource.)

Parameters:

   $sql  
   $cursor  

[ Top ]

method qstr [line 1197]

quoted qstr( s $s, [[magic_quotes] $magic_quotes = false])

Quotes a string.

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




Tags:

return:  string to be sent back to database


Overrides ADOConnection::qstr() (Correctly quotes a string so that all strings are escaped. We prefix and append to the string single-quotes.)

Parameters:

s   $s   the string to quote
[magic_quotes]   $magic_quotes   if $s is GET/POST var, set to get_magic_quotes_gpc(). This undoes the stupidity of magic quotes for GPC.

[ Top ]

method RollbackTrans [line 418]

void RollbackTrans( )



Overrides ADOConnection::RollbackTrans() (If database does not support transactions, rollbacks always fail, so return false)

[ Top ]

method RowLock [line 307]

void RowLock( $tables, $where, [ $flds = '1 as ignore'])



Overrides ADOConnection::RowLock() (Lock a row, will escalate and lock the table if row locking not supported will normally free the lock at the end of the transaction)

Parameters:

   $tables  
   $where  
   $flds  

[ Top ]

method SelectDB [line 429]

void SelectDB( $dbName)



Overrides ADOConnection::SelectDB() (Choose a database to connect to. Many databases do not support this.)

Parameters:

   $dbName  

[ Top ]

method SelectLimit [line 566]

void &SelectLimit( $sql, [ $nrows = -1], [ $offset = -1], [ $inputarr = false], [ $secs2cache = 0])



Overridden in child classes as:

ADODB_oci805::SelectLimit()

Overrides ADOConnection::SelectLimit() (Will select, getting rows from $offset (1-based), for $nrows.)

Parameters:

   $sql  
   $nrows  
   $offset  
   $inputarr  
   $secs2cache  

[ Top ]

method ServerInfo [line 244]

void ServerInfo( )



Overrides ADOConnection::ServerInfo() (parent method not documented)

[ Top ]

method SQLDate [line 467]

void SQLDate( $fmt, [ $col = false])



Overrides ADOConnection::SQLDate() (parent method not documented)

Parameters:

   $fmt  
   $col  

[ Top ]

method TextMax [line 1182]

void TextMax( )



[ Top ]

method Time [line 142]

void Time( )



Overrides ADOConnection::Time() (parent method not documented)

[ Top ]

method UpdateBlob [line 681]

void 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...




Overrides ADOConnection::UpdateBlob() (Update a blob column, given a where clause. There are more sophisticated blob handling functions that we could have implemented, but all require a very complex API. Instead we have chosen something that is extremely simple to understand and use.)

Parameters:

   $table  
   $column  
   $val  
   $where  
   $blobtype  

[ Top ]

method UpdateBlobFile [line 715]

void UpdateBlobFile( $table, $column, $val, $where, [ $blobtype = 'BLOB'])

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



Overrides ADOConnection::UpdateBlobFile() (Usage: UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1');)

Parameters:

   $table  
   $column  
   $val  
   $where  
   $blobtype  

[ Top ]

method _affectedrows [line 263]

void _affectedrows( )



[ Top ]

method _close [line 1085]

void _close( )



[ Top ]

method _connect [line 184]

void _connect( $argHostname, $argUsername, $argPassword, $argDatabasename, [ $mode = 0])



Parameters:

   $argHostname  
   $argUsername  
   $argPassword  
   $argDatabasename  
   $mode  

[ Top ]

method _nconnect [line 258]

void _nconnect( $argHostname, $argUsername, $argPassword, $argDatabasename)



Overrides ADOConnection::_nconnect() (parent method not documented)

Parameters:

   $argHostname  
   $argUsername  
   $argPassword  
   $argDatabasename  

[ Top ]

method _pconnect [line 252]

void _pconnect( $argHostname, $argUsername, $argPassword, $argDatabasename)



Parameters:

   $argHostname  
   $argUsername  
   $argPassword  
   $argDatabasename  

[ Top ]

method _query [line 978]

void _query( $sql, $inputarr)



Overridden in child classes as:

ADODB_oci8po::_query()

Parameters:

   $sql  
   $inputarr  

[ Top ]


Documentation generated on Fri, 18 Jul 2008 21:40:32 +0200 by phpDocumentor 1.4.1