ADODB_ibase Class Reference

Inheritance diagram for ADODB_ibase:

ADOConnection ADODB_borland_ibase ADODB_firebird 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 ($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)"
 cache for 1 hour
 $sysTimeStamp = "cast('NOW' as 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.


Constructor & Destructor Documentation

ADODB_ibase.ADODB_ibase  ) 
 

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


Member Function Documentation

ADODB_ibase._BlobDecode blob  ) 
 

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

ADODB_ibase._close  ) 
 

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

ADODB_ibase._connect argHostname,
argUsername,
argPassword,
argDatabasename,
persist = false
 

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

ADODB_ibase._ConvertFieldType &$  fld,
ftype,
flen,
fscale,
fsubtype,
fprecision,
dialect3
 

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

& ADODB_ibase._Execute sql,
inputarr = false
 

Reimplemented from ADOConnection.

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

ADODB_ibase._handleerror  ) 
 

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

ADODB_ibase._pconnect argHostname,
argUsername,
argPassword,
argDatabasename
 

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

ADODB_ibase._query sql,
iarr = false
 

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

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.

ADODB_ibase.BlobDecode blob  ) 
 

Reimplemented from ADOConnection.

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

ADODB_ibase.BlobEncode blob  ) 
 

Reimplemented from ADOConnection.

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

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.

ADODB_ibase.CreateSequence seqname,
startID = 1
 

Reimplemented from ADOConnection.

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

ADODB_ibase.DropSequence seqname  ) 
 

Reimplemented from ADOConnection.

Definition at line 260 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.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.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.

& ADODB_ibase.MetaColumns table  ) 
 

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

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

ADODB_ibase.MetaPrimaryKeys table,
owner_notused = false,
internalKey = false
 

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

ADODB_ibase.OldUpdateBlob table,
column,
val,
where,
blobtype = 'BLOB'
 

Definition at line 633 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.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.

ADODB_ibase.RowLock tables,
where,
col
 

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

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

ADODB_ibase.SQLDate fmt,
col = false
 

Reimplemented from ADOConnection.

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

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 599 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 571 of file adodb-ibase.inc.php.


Member Data Documentation

ADODB_ibase.$_bindInputArray = true
 

A boolean variable to state whether its a persistent connection or normal connection. */.

Reimplemented from ADOConnection.

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

ADODB_ibase.$_transactionID
 

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

ADODB_ibase.$ansiOuter = true
 

operator to use for right outer join in WHERE clause

Reimplemented from ADOConnection.

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

ADODB_ibase.$blobEncodeType = 'C'
 

Reimplemented from ADOConnection.

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

ADODB_ibase.$buffers = 0
 

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

ADODB_ibase.$concat_operator = '||'
 

maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro

Reimplemented from ADOConnection.

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

ADODB_ibase.$databaseType = "ibase"
 

Reimplemented from ADOConnection.

Reimplemented in ADODB_borland_ibase, and ADODB_firebird.

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

ADODB_ibase.$dataProvider = "ibase"
 

Reimplemented from ADOConnection.

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

ADODB_ibase.$dialect = 1
 

Reimplemented in ADODB_firebird.

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

ADODB_ibase.$fmtDate = "'Y-m-d'"
 

uppercase function

Reimplemented from ADOConnection.

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

ADODB_ibase.$fmtTimeStamp = "'Y-m-d, H:i:s'"
 

used by DBDate() as the default date format used by the database

Reimplemented from ADOConnection.

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

ADODB_ibase.$hasAffectedRows = false
 

supports autoincrement ID?

Reimplemented from ADOConnection.

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

ADODB_ibase.$hasGenID = true
 

has ability to run MoveFirst(), scrolling backwards

Reimplemented from ADOConnection.

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

ADODB_ibase.$ibase_datefmt = '%Y-%m-%d'
 

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

ADODB_ibase.$ibase_timefmt = "%H:%M:%S"
 

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

ADODB_ibase.$ibase_timestampfmt = "%Y-%m-%d %H:%M:%S"
 

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

ADODB_ibase.$ibasetrans
 

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

ADODB_ibase.$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"
 

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

ADODB_ibase.$metaTablesSQL = "select rdb\$relation_name from rdb\$relations where rdb\$relation_name not like 'RDB\$%'"
 

Reimplemented from ADOConnection.

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

ADODB_ibase.$poorAffectedRows = true
 

Reimplemented from ADOConnection.

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

ADODB_ibase.$replaceQuote = "''"
 

string that represents FALSE for a database

Reimplemented from ADOConnection.

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

ADODB_ibase.$role = false
 

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

ADODB_ibase.$sysDate = "cast('TODAY' as timestamp)"
 

cache for 1 hour

Reimplemented from ADOConnection.

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

ADODB_ibase.$sysTimeStamp = "cast('NOW' as timestamp)"
 

name of function that returns the current date

Reimplemented from ADOConnection.

Reimplemented in ADODB_firebird.

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


The documentation for this class was generated from the following file:
Generated on Fri Apr 7 10:48:44 2006 for TYPO3 by  doxygen 1.4.6