Documentation TYPO3 par Ameos

ADODB_sqlite Class Reference

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

Public Member Functions

 ADODB_sqlite ()
 ServerInfo ()
 BeginTrans ()
 CommitTrans ($ok=true)
 RollbackTrans ()
MetaColumns ($tab)
 _init ($parentDriver)
 _insertid ()
 _affectedrows ()
 ErrorMsg ()
 ErrorNo ()
 SQLDate ($fmt, $col=false)
 _createFunctions ()
 _connect ($argHostname, $argUsername, $argPassword, $argDatabasename)
 _pconnect ($argHostname, $argUsername, $argPassword, $argDatabasename)
 _query ($sql, $inputarr=false)
SelectLimit ($sql, $nrows=-1, $offset=-1, $inputarr=false, $secs2cache=0)
 GenID ($seq='adodbseq', $start=1)
 CreateSequence ($seqname='adodbseq', $start=1)
 DropSequence ($seqname)
 _close ()
MetaIndexes ($table, $primary=FALSE, $owner=false)

Public Attributes

 $databaseType = "sqlite"
 $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
 $_errorNo = 0
 $hasLimit = true
 support mssql/access SELECT TOP 10 * FROM TABLE
 $hasInsertID = true
 $hasAffectedRows = true
 supports autoincrement ID?
 $metaTablesSQL = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"
 supports affected rows for update/delete?
 $sysDate = "adodb_date('Y-m-d')"
 Use 'true' to store the item compressed (uses zlib).
 $sysTimeStamp = "adodb_date('Y-m-d H:i:s')"
 name of function that returns the current date
 $fmtTimeStamp = "'Y-m-d H:i:s'"
 used by DBDate() as the default date format used by the database
 $_genSeqSQL = "create table %s (id integer)"
 $_dropSeqSQL = 'drop table %s'

Detailed Description

Definition at line 21 of file adodb-sqlite.inc.php.


Member Function Documentation

ADODB_sqlite::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 47 of file adodb-sqlite.inc.php.

ADODB_sqlite::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 55 of file adodb-sqlite.inc.php.

References ADOConnection::Execute().

ADODB_sqlite::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 63 of file adodb-sqlite.inc.php.

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

ADODB_sqlite::RollbackTrans (  ) 

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

Returns:
true/false.

Reimplemented from ADOConnection.

Definition at line 72 of file adodb-sqlite.inc.php.

References ADOConnection::Execute().

Referenced by CommitTrans().

ADODB_sqlite::ErrorMsg (  ) 

Returns:
the last error message

Reimplemented from ADOConnection.

Definition at line 133 of file adodb-sqlite.inc.php.

ADODB_sqlite::ErrorNo (  ) 

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

Reimplemented from ADOConnection.

Definition at line 139 of file adodb-sqlite.inc.php.

& ADODB_sqlite::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 193 of file adodb-sqlite.inc.php.

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

ADODB_sqlite::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 213 of file adodb-sqlite.inc.php.

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

& ADODB_sqlite::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 264 of file adodb-sqlite.inc.php.

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


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


Généré par L'expert TYPO3 avec  doxygen 1.4.6