"TYPO3 4.0.1: ADODB_odbtp Class Reference", "datetime" => "Sat Dec 2 19:23:35 2006", "date" => "2 Dec 2006", "doxygenversion" => "1.4.6", "projectname" => "TYPO3 4.0.1", "projectnumber" => "4.0.1" ); get_header($doxygen_vars); ?>

ADODB_odbtp Class Reference

Inheritance diagram for ADODB_odbtp:

Inheritance graph
[legend]
Collaboration diagram for ADODB_odbtp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ADODB_odbtp ()
 ServerInfo ()
 ErrorMsg ()
 ErrorNo ()
 _insertid ()
 _affectedrows ()
 CreateSequence ($seqname='adodbseq', $start=1)
 DropSequence ($seqname)
 GenID ($seq='adodbseq', $start=1)
 _connect ($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='')
 _pconnect ($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='')
 SelectDB ($dbName)
MetaTables ($ttype='', $showSchema=false, $mask=false)
MetaColumns ($table, $upper=true)
MetaPrimaryKeys ($table, $owner='')
MetaForeignKeys ($table, $owner='', $upper=false)
 BeginTrans ()
 CommitTrans ($ok=true)
 RollbackTrans ()
SelectLimit ($sql, $nrows=-1, $offset=-1, $inputarr=false, $secs2cache=0)
 Prepare ($sql)
 PrepareSP ($sql)
 Parameter (&$stmt, &$var, $name, $isOutput=false, $maxLen=0, $type=0)
 UpdateBlob ($table, $column, $val, $where, $blobtype='image')
 IfNull ($field, $ifNull)
 _query ($sql, $inputarr=false)
 _close ()

Public Attributes

 $databaseType = "odbtp"
 $dataProvider = "odbtp"
 $fmtDate = "'Y-m-d'"
 uppercase function
 $fmtTimeStamp = "'Y-m-d, h:i:sA'"
 used by DBDate() as the default date format used by the database
 $replaceQuote = "''"
 string that represents FALSE for a database
 $odbc_driver = 0
 $hasAffectedRows = true
 supports autoincrement ID?
 $hasInsertID = false
 $hasGenID = true
 has ability to run MoveFirst(), scrolling backwards
 $hasMoveFirst = true
 this is a readonly database - used by phpLens
 $_genSeqSQL = "create table %s (seq_name char(30) not null unique , seq_value integer not null)"
 $_dropSeqSQL = "delete from adodb_seq where seq_name = '%s'"
 $_bindInputArray = false
 A boolean variable to state whether its a persistent connection or normal connection. */.
 $_useUnicodeSQL = false
 $_canPrepareSP = false
 $_dontPoolDBC = true

Detailed Description

Definition at line 17 of file adodb-odbtp.inc.php.


Member Function Documentation

ADODB_odbtp::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 386 of file adodb-odbtp.inc.php.

ADODB_odbtp::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 401 of file adodb-odbtp.inc.php.

ADODB_odbtp::ErrorMsg  ) 
 

Returns:
the last error message

Reimplemented from ADOConnection.

Definition at line 46 of file adodb-odbtp.inc.php.

Referenced by _connect().

ADODB_odbtp::ErrorNo  ) 
 

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

Reimplemented from ADOConnection.

Definition at line 52 of file adodb-odbtp.inc.php.

ADODB_odbtp::GenID seq = 'adodbseq',
start = 1
 

Generates a sequence id and stores it in $this->genID; GenID is only available if $this->hasGenID = true;

Parameters:
seqname name of sequence to use
startID if sequence does not exist, start at this ID
Returns:
0 if not supported, otherwise a sequence id

Reimplemented from ADOConnection.

Definition at line 106 of file adodb-odbtp.inc.php.

References ADOConnection::Execute(), and ADOConnection::GetOne().

& ADODB_odbtp::MetaColumns table,
upper = true
 

List columns in a database as an array of ADOFieldObjects. See top of file for definition of object.

Parameters:
$table table name to query
$normalize makes table name case-insensitive (required by some databases) is optional database schema to use - not supported by all databases.
Returns:
array of ADOFieldObjects for current table.

Reimplemented from ADOConnection.

Definition at line 294 of file adodb-odbtp.inc.php.

& ADODB_odbtp::MetaForeignKeys table,
owner = '',
upper = false
 

Returns:
assoc array where keys are tables, and values are foreign keys

Reimplemented from ADOConnection.

Definition at line 356 of file adodb-odbtp.inc.php.

& ADODB_odbtp::MetaPrimaryKeys table,
owner = ''
 

Returns:
an array with the primary key columns in it.

Reimplemented from ADOConnection.

Definition at line 339 of file adodb-odbtp.inc.php.

& ADODB_odbtp::MetaTables ttype = '',
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 272 of file adodb-odbtp.inc.php.

References ADOConnection::GetArray(), and ADOConnection::SetFetchMode().

ADODB_odbtp::Prepare sql  ) 
 

Should prepare the sql statement and return the stmt resource. For databases that do not support this, we return the $sql. To ensure compatibility with databases that do not support prepare:

$stmt = $db->Prepare("insert into table (id, name) values (?,?)"); $db->Execute($stmt,array(1,'Jill')) or die('insert failed'); $db->Execute($stmt,array(2,'Joe')) or die('insert failed');

Parameters:
sql SQL to send to database
Returns:
return FALSE, or the prepared statement, or the original sql if if the database does not support prepare.

Reimplemented from ADOConnection.

Definition at line 432 of file adodb-odbtp.inc.php.

ADODB_odbtp::RollbackTrans  ) 
 

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

Returns:
true/false.

Reimplemented from ADOConnection.

Definition at line 412 of file adodb-odbtp.inc.php.

ADODB_odbtp::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 262 of file adodb-odbtp.inc.php.

& ADODB_odbtp::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.

Definition at line 422 of file adodb-odbtp.inc.php.

References ADOConnection::SelectLimit().

ADODB_odbtp::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 40 of file adodb-odbtp.inc.php.

ADODB_odbtp::UpdateBlob table,
column,
val,
where,
blobtype = 'image'
 

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.

Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course.

Usage to update a $blobvalue which has a primary key blob_id=1 into a field blobtable.blobcolumn:

UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1');

Insert example:

$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');

Reimplemented from ADOConnection.

Definition at line 497 of file adodb-odbtp.inc.php.


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