Documentation TYPO3 par Ameos

ADODB_db2 Class Reference

Inheritance diagram for ADODB_db2:

Inheritance graph
[legend]
Collaboration diagram for ADODB_db2:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ADODB_db2 ()
 _connect ($argDSN, $argUsername, $argPassword, $argDatabasename)
 _pconnect ($argDSN, $argUsername, $argPassword, $argDatabasename)
 ServerInfo ()
 CreateSequence ($seqname='adodbseq', $start=1)
 DropSequence ($seqname)
 GenID ($seq='adodbseq', $start=1)
 ErrorMsg ()
 ErrorNo ()
 BeginTrans ()
 CommitTrans ($ok=true)
 RollbackTrans ()
 MetaPrimaryKeys ($table)
MetaTables ($ttype=false)
 DB2Types ($t)
MetaColumns ($table)
 Prepare ($sql)
 _query ($sql, $inputarr=false)
 UpdateBlob ($table, $column, $val, $where, $blobtype='BLOB')
 _close ()
 _affectedrows ()

Public Attributes

 $databaseType = "db2"
 $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
 $dataProvider = "db2"
 $hasAffectedRows = true
 supports autoincrement ID?
 $binmode = DB2_BINARY
 $useFetchArray = false
 $_bindInputArray = false
 A boolean variable to state whether its a persistent connection or normal connection. */.
 $_genSeqSQL = "create table %s (id integer)"
 $_autocommit = true
 $_haserrorfunctions = true
 $_lastAffectedRows = 0
 $uCaseTables = true
 $_dropSeqSQL = 'drop table %s'

Detailed Description

Definition at line 25 of file adodb-db2.inc.php.


Member Function Documentation

ADODB_db2::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 218 of file adodb-db2.inc.php.

ADODB_db2::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 227 of file adodb-db2.inc.php.

References RollbackTrans().

ADODB_db2::ErrorMsg  ) 
 

Returns:
the last error message

Reimplemented from ADOConnection.

Definition at line 188 of file adodb-db2.inc.php.

References ADOConnection::ErrorMsg().

ADODB_db2::ErrorNo  ) 
 

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

Reimplemented from ADOConnection.

Definition at line 197 of file adodb-db2.inc.php.

References ADOConnection::ErrorNo().

ADODB_db2::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 159 of file adodb-db2.inc.php.

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

ADODB_db2::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 451 of file adodb-db2.inc.php.

ADODB_db2::RollbackTrans  ) 
 

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

Returns:
true/false.

Reimplemented from ADOConnection.

Definition at line 238 of file adodb-db2.inc.php.

Referenced by CommitTrans().

ADODB_db2::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 107 of file adodb-db2.inc.php.

References ADOConnection::ServerInfo().

ADODB_db2::UpdateBlob table,
column,
val,
where,
blobtype = 'BLOB'
 

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 534 of file adodb-db2.inc.php.


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


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6