Documentation TYPO3 par Ameos |
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() |
Definition at line 55 of file adodb-oci8.inc.php.
ADODB_oci8::ServerInfo | ( | ) |
Get server version info...
Reimplemented from ADOConnection.
Definition at line 243 of file adodb-oci8.inc.php.
References ADOConnection::_findvers(), and ADOConnection::GetOne().
ADODB_oci8::DBDate | ( | $ | d | ) |
Converts a date "d" to a string that the database can understand.
d | a date in Unix date time format. |
Reimplemented from ADOConnection.
Definition at line 274 of file adodb-oci8.inc.php.
References ADORecordSet::UnixDate().
ADODB_oci8::DBTimeStamp | ( | $ | ts | ) |
Converts a timestamp "ts" to a string that the database can understand.
ts | a timestamp in Unix date time format. |
Reimplemented from ADOConnection.
Definition at line 299 of file adodb-oci8.inc.php.
References ADORecordSet::UnixTimeStamp().
& ADODB_oci8::MetaTables | ( | $ | ttype = false , |
|
$ | showSchema = false , |
|||
$ | mask = false | |||
) |
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 |
Reimplemented from ADOConnection.
Definition at line 312 of file adodb-oci8.inc.php.
References ADOConnection::MetaTables(), and qstr().
& ADODB_oci8::MetaIndexes | ( | $ | table, | |
$ | primary = FALSE , |
|||
$ | owner = false | |||
) |
List indexes on a table as an array.
table | table name to query | |
primary | true to only show primary keys. Not actually used for most databases |
Reimplemented from ADOConnection.
Definition at line 328 of file adodb-oci8.inc.php.
References ADOConnection::$false, Execute(), and ADOConnection::SetFetchMode().
ADODB_oci8::BeginTrans | ( | ) |
Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().
Reimplemented from ADOConnection.
Definition at line 394 of file adodb-oci8.inc.php.
References Execute().
Referenced by RowLock(), UpdateBlob(), and UpdateBlobFile().
ADODB_oci8::CommitTrans | ( | $ | ok = true |
) |
If database does not support transactions, always return true as data always commited
$ok | set to false to rollback transaction, true to commit |
Reimplemented from ADOConnection.
Definition at line 405 of file adodb-oci8.inc.php.
References RollbackTrans().
Referenced by UpdateBlob(), and UpdateBlobFile().
ADODB_oci8::RollbackTrans | ( | ) |
If database does not support transactions, rollbacks always fail, so return 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.
dbName | is the name of the database to select |
Reimplemented from ADOConnection.
Definition at line 428 of file adodb-oci8.inc.php.
ADODB_oci8::ErrorMsg | ( | ) |
Reimplemented from ADOConnection.
Definition at line 433 of file adodb-oci8.inc.php.
ADODB_oci8::ErrorNo | ( | ) |
Reimplemented from ADOConnection.
Definition at line 448 of file adodb-oci8.inc.php.
& 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
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 |
Reimplemented from ADOConnection.
Reimplemented in ADODB_oci805.
Definition at line 559 of file adodb-oci8.inc.php.
References ADOConnection::$false, ADOConnection::CacheExecute(), Execute(), Prepare(), and ADOConnection::SelectLimit().
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 ADOConnection::_Execute(), BeginTrans(), CommitTrans(), Execute(), and ADOConnection::outp().
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 BeginTrans(), CommitTrans(), Execute(), and ADOConnection::outp().
& ADODB_oci8::Execute | ( | $ | sql, | |
$ | inputarr = false | |||
) |
Execute SQL
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. |
Reimplemented from ADOConnection.
Definition at line 741 of file adodb-oci8.inc.php.
References ADOConnection::_Execute(), and Prepare().
Referenced by _connect(), BeginTrans(), ExecuteCursor(), MetaColumns(), MetaIndexes(), MetaPrimaryKeys(), SelectLimit(), Time(), UpdateBlob(), and UpdateBlobFile().
ADODB_oci8::qstr | ( | $ | s, | |
$ | magic_quotes = false | |||
) |
Quotes a string. An example is $db->qstr("Don't bother",magic_quotes_runtime());
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. |
Reimplemented from ADOConnection.
Definition at line 1182 of file adodb-oci8.inc.php.
Referenced by MetaForeignKeys(), and MetaTables().