ADODB_sqlite Class Reference

Inheritance diagram for ADODB_sqlite:

ADOConnection ADODB_sqlitepo 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')"
 cache for 1 hour
 $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.


Constructor & Destructor Documentation

ADODB_sqlite.ADODB_sqlite  ) 
 

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


Member Function Documentation

ADODB_sqlite._affectedrows  ) 
 

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

ADODB_sqlite._close  ) 
 

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

ADODB_sqlite._connect argHostname,
argUsername,
argPassword,
argDatabasename
 

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

ADODB_sqlite._createFunctions  ) 
 

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

ADODB_sqlite._init parentDriver  ) 
 

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

ADODB_sqlite._insertid  ) 
 

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

ADODB_sqlite._pconnect argHostname,
argUsername,
argPassword,
argDatabasename
 

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

ADODB_sqlite._query sql,
inputarr = false
 

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

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.

ADODB_sqlite.CreateSequence seqname = 'adodbseq',
start = 1
 

Reimplemented from ADOConnection.

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

ADODB_sqlite.DropSequence seqname  ) 
 

Reimplemented from ADOConnection.

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

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

& ADODB_sqlite.MetaColumns tab  ) 
 

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

& ADODB_sqlite.MetaIndexes table,
primary = FALSE,
owner = false
 

There must be a more elegant way of doing this, the index elements appear in the SQL statement in cols[1] between parentheses e.g CREATE UNIQUE INDEX ware_0 ON warehouse (org,warehouse)

Reimplemented from ADOConnection.

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

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.

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

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.SQLDate fmt,
col = false
 

Reimplemented from ADOConnection.

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


Member Data Documentation

ADODB_sqlite.$_dropSeqSQL = 'drop table %s'
 

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

ADODB_sqlite.$_errorNo = 0
 

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

ADODB_sqlite.$_genSeqSQL = "create table %s (id integer)"
 

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

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

ADODB_sqlite.$databaseType = "sqlite"
 

Reimplemented from ADOConnection.

Reimplemented in ADODB_sqlitepo.

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

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

ADODB_sqlite.$hasAffectedRows = true
 

supports autoincrement ID?

Reimplemented from ADOConnection.

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

ADODB_sqlite.$hasInsertID = true
 

Reimplemented from ADOConnection.

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

ADODB_sqlite.$hasLimit = true
 

support mssql/access SELECT TOP 10 * FROM TABLE

Reimplemented from ADOConnection.

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

ADODB_sqlite.$metaTablesSQL = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"
 

supports affected rows for update/delete?

Reimplemented from ADOConnection.

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

ADODB_sqlite.$replaceQuote = "''"
 

string that represents FALSE for a database

Reimplemented from ADOConnection.

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

ADODB_sqlite.$sysDate = "adodb_date('Y-m-d')"
 

cache for 1 hour

Reimplemented from ADOConnection.

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

ADODB_sqlite.$sysTimeStamp = "adodb_date('Y-m-d H:i:s')"
 

name of function that returns the current date

Reimplemented from ADOConnection.

Definition at line 31 of file adodb-sqlite.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