Documentation TYPO3 par Ameos

ADODB_ibase Class Reference

Inheritance diagram for ADODB_ibase:
[legend]
Collaboration diagram for ADODB_ibase:
[legend]
List of all members.

Public Member Functions

 ADODB_ibase ()
 _connect ($argHostname, $argUsername, $argPassword, $argDatabasename, $persist=false)
 _pconnect ($argHostname, $argUsername, $argPassword, $argDatabasename)
 MetaPrimaryKeys ($table, $owner_notused=false, $internalKey=false)
 ServerInfo ()
 BeginTrans ()
 CommitTrans ($ok=true)
_Execute ($sql, $inputarr=false)
 RollbackTrans ()
MetaIndexes ($table, $primary=FALSE, $owner=false)
 RowLock ($tables, $where, $col)
 CreateSequence ($seqname, $startID=1)
 DropSequence ($seqname)
 GenID ($seqname='adodbseq', $startID=1)
 SelectDB ($dbName)
 _handleerror ()
 ErrorNo ()
 ErrorMsg ()
 Prepare ($sql)
 _query ($sql, $iarr=false)
 _close ()
 _ConvertFieldType (&$fld, $ftype, $flen, $fscale, $fsubtype, $fprecision, $dialect3)
MetaColumns ($table)
 BlobEncode ($blob)
 BlobDecode ($blob)
 _BlobDecode_old ($blob)
 _BlobDecode ($blob)
 UpdateBlobFile ($table, $column, $path, $where, $blobtype='BLOB')
 UpdateBlob ($table, $column, $val, $where, $blobtype='BLOB')
 OldUpdateBlob ($table, $column, $val, $where, $blobtype='BLOB')
 SQLDate ($fmt, $col=false)

Public Attributes

 $databaseType = "ibase"
 $dataProvider = "ibase"
 $replaceQuote = "''"
 string that represents FALSE for a database
 $ibase_datefmt = '%Y-%m-%d'
 $fmtDate = "'Y-m-d'"
 uppercase function
 $ibase_timestampfmt = "%Y-%m-%d %H:%M:%S"
 $ibase_timefmt = "%H:%M:%S"
 $fmtTimeStamp = "'Y-m-d, H:i:s'"
 used by DBDate() as the default date format used by the database
 $concat_operator = '||'
 maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro
 $_transactionID
 $metaTablesSQL = "select rdb\$relation_name from rdb\$relations where rdb\$relation_name not like 'RDB\$%'"
 $metaColumnsSQL = "select a.rdb\$field_name, a.rdb\$null_flag, a.rdb\$default_source, b.rdb\$field_length, b.rdb\$field_scale, b.rdb\$field_sub_type, b.rdb\$field_precision, b.rdb\$field_type from rdb\$relation_fields a, rdb\$fields b where a.rdb\$field_source = b.rdb\$field_name and a.rdb\$relation_name = '%s' order by a.rdb\$field_position asc"
 $ibasetrans
 $hasGenID = true
 has ability to run MoveFirst(), scrolling backwards
 $_bindInputArray = true
 A boolean variable to state whether its a persistent connection or normal connection. */.
 $buffers = 0
 $dialect = 1
 $sysDate = "cast('TODAY' as timestamp)"
 Use 'true' to store the item compressed (uses zlib).
 $sysTimeStamp = "CURRENT_TIMESTAMP"
 name of function that returns the current date
 $ansiOuter = true
 operator to use for right outer join in WHERE clause
 $hasAffectedRows = false
 supports autoincrement ID?
 $poorAffectedRows = true
 $blobEncodeType = 'C'
 $role = false

Detailed Description

Definition at line 29 of file adodb-ibase.inc.php.


Member Function Documentation

ADODB_ibase::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.

Reimplemented in ADODB_borland_ibase, and ADODB_firebird.

Definition at line 121 of file adodb-ibase.inc.php.

References ADOConnection::_findvers().

ADODB_ibase::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.

Reimplemented in ADODB_borland_ibase.

Definition at line 136 of file adodb-ibase.inc.php.

Referenced by RowLock().

ADODB_ibase::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 145 of file adodb-ibase.inc.php.

References RollbackTrans().

ADODB_ibase::RollbackTrans (  ) 

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

Returns:
true/false.

Reimplemented from ADOConnection.

Definition at line 177 of file adodb-ibase.inc.php.

Referenced by CommitTrans().

& ADODB_ibase::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 190 of file adodb-ibase.inc.php.

References ADOConnection::$false, ADOConnection::Execute(), and ADOConnection::SetFetchMode().

ADODB_ibase::GenID ( seqname = 'adodbseq',
startID = 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 266 of file adodb-ibase.inc.php.

References ADOConnection::Execute().

ADODB_ibase::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 283 of file adodb-ibase.inc.php.

ADODB_ibase::ErrorNo (  ) 

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

Reimplemented from ADOConnection.

Definition at line 293 of file adodb-ibase.inc.php.

ADODB_ibase::ErrorMsg (  ) 

Returns:
the last error message

Reimplemented from ADOConnection.

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

ADODB_ibase::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 304 of file adodb-ibase.inc.php.

ADODB_ibase::UpdateBlobFile ( table,
column,
path,
where,
blobtype = 'BLOB' 
)

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

$blobtype supports 'BLOB' and 'CLOB'

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

Reimplemented from ADOConnection.

Definition at line 597 of file adodb-ibase.inc.php.

References ADOConnection::Execute().

ADODB_ibase::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 625 of file adodb-ibase.inc.php.

References ADOConnection::Execute().


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


Généré par TYPO3 Ameos avec  doxygen 1.4.6