Home » Database » MDB2_Driver_sqlite
sqlite MDB2 driver
This package is unmaintained.
Download latest release 1.5.0b4 (archived versions might be outdated)
License: BSD License
Description
This is the SQLite MDB2 driver.
Maintainers
- Lukas Kahwe Smith (lsmith) — lead, inactive
- Lorenzo Alberton (quipo) — lead, active
Dependencies
Required
- PHP (>= 5.2.0)
- PEAR Installer (>= 1.9.1)
- MDB2 (>= 2.5.0b4)
- sqlite (extension)
Releases
- 1.5.0b4 (beta, 2012-10-23)
Release notes
License: BSD License
- PEAR::isError() -> MDB2::isError(), Bug #19491.
- PEAR::loadExtension() -> extension_loaded(), Bug #19583.
- Fix Bug #19262. Updates conditional stagements to use logical operators to include MDB2_FETCHMODE_OBJECT where appropriate. Was broken in r321197.
- Fixed createIndex not using quoteIdentifier in SQLite driver
- Have dropTable() return MDB2_OK on success, as documented (bug 19199)
- Have dropIndex() return MDB2_OK on success, as documented (bug 19198)
- Have vacuum() return MDB2_OK on success, as documented (bug 19196)
- Have createIndex() return MDB2_OK on success, as documented (bug 19195)
- Have dropConstraint() return MDB2_OK on success, as documented (bug 19194)
- Have createConstraint() return MDB2_OK on success, as documented (bug 19193)
- Have dropSequence() return MDB2_OK on success, as documented (bug 19191).
- FETCHMODE constants are NOT bitwise.
- fixed bug #18203: Type introspection breaks with associative arrays if names are identical (patch by Peter Bex)
- request #18316: Add TINYINT to list of coltypes in MDB2_Driver_Reverse_sqlite [brotherli]
- fixed bug #16275: split() is deprecated in PHP 5.3
- request #18316: Add TINYINT to list of coltypes in MDB2_Driver_Reverse_sqlite [brotherli]note:
open todo items:
- fix pattern escaping using GLOB instead of LIKE or create and register own implementation of LIKE - 1.5.0b3 (beta, 2010-08-29)
Release notes
License: BSD License
- fixed bug #16275: split() is deprecated in PHP 5.3
note:
open todo items:
- fix pattern escaping using GLOB instead of LIKE or create and register own implementation of LIKE - 1.5.0b2 (beta, 2009-01-14)
Release notes
License: BSD License
- fixed bug #12117: disconnect() does not work as documented
- fixed bug #13815: incomplete regexp in the Reverse module
- fixed bug #13928: Invalid triggers created for 'ON UPDATE'
- fixed bug #14302: Connection errors were not always returnednote:
open todo items:
- fix pattern escaping using GLOB instead of LIKE or create and register own implementation of LIKE - 1.5.0b1 (beta, 2008-03-15)
Release notes
License: BSD License
- request #12731: added truncateTable() in the Manager module
- request #12732: added vacuum() in the Manager module for OPTIMIZE/VACUUM TABLE abstraction
- fixed bug #12924: correctly handle internal expected errors even with custom error handling
- added standaloneQuery() and databaseExists()
- request #13106: added unixtimestamp() in the Function module
- fixed bug #13201: better regexp in errorInfo()
- fixed bug #13283: replace() doesn't respect quote_identifiers option
- fixed bug #13303: PRIMARY keys are not always returned in listTableConstraints()
and in getTableConstraintDefinition()note:
open todo items:
- fix pattern escaping using GLOB instead of LIKE or create an register own implementation of LIKE - 1.5.0a2 (alpha, 2007-12-06)
Release notes
License: BSD License
- fixed bug #12105: new error message in the SQLite driver (patch by Adam Ashley)
- fixed bug #12145: missing optional spaces in regexp in _getTableColumns() in the
Reverse module
- request #12012: added charset support in createDatabase() and collation support
in createTable() for table fieldsnote:
open todo items:
- fix pattern escaping using GLOB instead of LIKE or create an register own implementation of LIKE - 1.5.0a1 (alpha, 2007-10-28)
Release notes
License: BSD License
- initial support for FOREIGN KEY and CHECK constraints in the Reverse and Manager modules
(on FK creation, some triggers are automatically created to enforce the FK constraint)
- in listTableConstraints() in the Reverse module, also search in table definition
for PRIMARY KEYs and FOREIGN KEYs
- fixed bug #11428: propagate quote() errors with invalid data types
- fixed bug #11790: avoid array_diff() because it has a memory leak in PHP 5.1.x
- fixed bug #12083: createTable() in the Manager module now returns MDB2_OK on success,
as documented
- fixed bug #12146: wrong regex in _getTableColumns($sql) in the Reverse module
- fixed bug #12269: tableInfo() in the Reverse module detect 'clob' data type
as first optionnote:
open todo items:
- fix pattern escaping using GLOB instead of LIKE or create an register own implementation of LIKE - 1.4.1 (stable, 2007-05-03)
Release notes
License: BSD License
- return length as "precision,scale" for NUMERIC and DECIMAL fields in mapNativeDatatype()
- in getTableIndexDefinition() and getTableConstraintDefinition() in the Reverse
module, also return the field position in the index/constraint
- fixed bug #10895: setLimit() does not work properly when a subquery uses LIMITnote:
open todo items:
- fix pattern escaping using GLOB instead of LIKE or create an register own implementation of LIKE - 1.4.0 (stable, 2007-03-13)
Release notes
License: BSD License
- propagate errors in getTableFieldDefinition() in the Reverse module
- fixed bug #9895: Error mapping broken since 5.2.0
- implemented a fallback mechanism within getTableIndexDefinition() and
getTableConstraintDefinition() in the Reverse module to ignore the 'idxname_format'
option and use the index name as provided in case of failure before returning
an error
- added a 'nativetype_map_callback' option to map native data declarations back to
custom data types (thanks to Andrew Hill).
- fixed bug #9693: execute statement again in case of a SQLITE_SCHEMA error
- fixed bug #10027: PHP4 compatibility in createConstraint() and dropConstraint()
- implemented listViews() in the Manager module
- implemented listTableViews() in the Manager module
- implemented listTableTriggers() in the Manager module
- implemented getTriggerDefinition() in the Reverse module [experimental]
- fixed bug #9828: propagate errors in getConnection()
- phpdoc fixesnote:
open todo items:
- fix pattern escaping using GLOB instead of LIKE or create an register own implementation of LIKE - 1.3.0 (stable, 2006-11-03)
Release notes
License: BSD License
note:
- this driver only supports SQLite version 2.x databases
- the replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced
- the multi_query test failes because this is not supported by ext/sqlite
- the savepoint test failes because this is not supported by sqlite
- the case sensitive search test fails because this is not supported by SQLite
- the pattern escaping test fails because this is not supported by SQLite
- do not skip id generation in nextId() when creating a sequence on demand
becazse this prevents lastInsertID() from working
- migrated to package.xml version 2open todo items:
- fix pattern escaping using GLOB instead of LIKE or create an register own implementation of LIKE - 1.2.1 (stable, 2006-08-21)
Release notes
License: BSD License
- fixed issue in tableInfo() that originates in getTableFieldDefinition() which
led to returning incorrect type values (Bug #8291)
- added support for NULL columns in getTableFieldDefinition()
- added full support for alterTable() via emulation
- added support for primary key creation and dropping
- do not list empty contraints and indexes
- use information_schema in listTableFields() instead of selecting from the
table since that does not work if the table is empty
- fixed handling of contraints in _getTableColumns()
- fixed primary key handling in alterTable(), createConstraint() and dropConstraint()
- do not set a default if type is a LOB (Request #8074)
- fixed handling return values when disable_query is set in _doQuery() and _execute()
- increased MDB2 dependency too 2.2.1note:
- this driver only supports SQLite version 2.x databases
- the replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced
- the multi_query test failes because this is not supported by ext/sqlite
- the savepoint test failes because this is not supported by sqlite
- the case sensitive search test fails because this is not supported by SQLite
- the pattern escaping test fails because this is not supported by SQLiteopen todo items:
- fix pattern escaping using GLOB instead of LIKE or create an register own implementation of LIKE - 1.2.0 (stable, 2006-07-23)
Release notes
License: BSD License
- added setTransactionIsolation()
- MDB2_PORTABILITY_RTRIM ignored by driver (Bug #8239)
- added ability to escape wildcard characters in escape() and quote()
- added setTransactionIsolation()
- added debug() call at the end of a query/prepare/execute calling (Request #7933)
- added context array parameter to debug() and make use of it whereever sensible
- added optional method name parameter to raiseError() and use whereever possible
- added ability to escape wildcard characters in escape() and quote()
- added debug() call at the end of a query/prepare/execute calling (Request #7933)
- added 'nativetype' output to tableInfo() and getTableFieldDefinition()
- added 'mdb2type' output to getTableFieldDefinition()
- reworked tableInfo() to use a common implementation based on getTableFieldDefinition()
when a table name is passed (Bug #8124)
- fixed incorrect regex in mapNativeDatatype() (Bug #8256) (thx ioz at ionosfera dot com)
- use old dsn when rolling back open transactions in disconnect()note: this driver only supports SQLite version 2.x databases
open todo items:
- fix pattern escaping using GLOB instead of LIKE or create an register own implementation of LIKE
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table tests fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced - 1.1.0 (stable, 2006-06-15)
Release notes
License: BSD License
- fixed unsigned handling in mapNativeDatatype()
- use setCharset() in connect()/_doConnect()
- generalized quoteIdentifier() with a property
- fixed warning in replace() if type is not set (Bug #7740)
- cosmetic performance tweak in getTableFieldDefinition()
- switched most array_key_exists() calls to !empty() to improve readability and performance
- fixed a few edge cases and potential warnings
- added ability to rewrite queries for query(), exec() and prepare() using a debug handler callback
- revert change that would prefer 'clob' over 'text' for TEXT fields
(this was breaking runtime instrospection)open todo items:
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table tests fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced - 1.0.2 (stable, 2006-05-14)
Release notes
License: BSD License
- explicitly set is_manip parameter to false for transaction debug calls
- added ability to hint that a constraint is a primary key in dropConstraint()
- typo fixes in phpdoc (thx Stoyan)
- added support for fixed and variable types for 'text' in declarations,
as well as in reverse engineering (Request #1523)
- made _doQuery() return a reference
- added userinfo's to all raiseError calls that previously had none
- added 'prepared_statements' supported meta data settingopen todo items:
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table tests fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced - 1.0.1 (stable, 2006-04-16)
Release notes
License: BSD License
- aligned _modifyQuery() signature and phpdoc
- fix bug sqlite:///:memory: trys to open file (bug #6599)
- added 'result_introspection' supported metadata support
- properly quote table names in tableInfo() (related to bug #6573)
- use connected_server_info in getServerVersion() as a cache cache
- use parent::disconnect() in disconnect()
- added server_version option
- set error code in all raiseError() calls
- added support for length in integer reverse engineering
- some fixes regarding boolean reverse engineering
- protect against sql injection in the reverse and manager moduleopen todo items:
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table tests fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced - 1.0.0 (stable, 2006-02-09)
Release notes
License: BSD License
- use PRAGMA short_column_names = 1/0 for MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES handling
- handle null as resource when disable_query option is enabled in result objectopen todo items:
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table tests fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced - 0.2.4 (beta, 2006-02-05)
Release notes
License: BSD License
- datatype 'clob' missing in mapNativeDatatype() (bug #6490)
- removed bogus result->free() (bug #6491)
- added support for length in integer and decimal columns
- improved regexp for column reverse engineering
- removed ugly hack for quote parameter in quote() since it was insufficient
(escaping also needs to be prevented)
- Now integer fields are created and mapped as INTEGER instead of INT, this
kick started the auto increment feature properly
- improved parsing in getServerInfo() (bug #6550)
- fix case when reading from sqlite information schema (bug #6491)open todo items:
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table tests fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced - 0.2.3 (beta, 2006-01-13)
Release notes
License: BSD License
- explicitly pass if the module is phptype specific in all loadModule calls (bug #6226)
- fixed handling of autoincrement and unsigned in Reverse and Datatype module
- tweaked handling of the native error message
- typo fixes in error handling of nextResult() and numRows() calls
- _fixIndexName() now just attempts to remove possible formatting
- renamed _isSequenceName() to _fixSequenceName()
- _fixSequenceName() now just attempts to remove possible formatting, and only
returns a boolean if no formatting was applied when the new "check" parameter is set to true
- use MDB2_ERROR_ALREADY_EXISTS if the database to create already exists (bug #6481)open todo items:
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table test fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced - 0.2.2 (beta, 2005-12-30)
Release notes
License: BSD License
- fixed handling of autoincrement in the datatype module
open todo items:
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table test fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced - 0.2.1 (beta, 2005-12-28)
Release notes
License: BSD License
- fixed now() and substring()
- disabled "add" and "rename" in alterTable() sqlite 2.x as they are not supported
- fixed bug in regexp inside _getTableColumns()
- added mapping for boolean into mapNativeDatatype()
- proper quote new table name in alterTable()open todo items:
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table test fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced - 0.2.0 (beta, 2005-12-21)
Release notes
License: BSD License
- do not fix case in listUsers()
- unified case fixing in the list*() methods
- support sorting order in createIndex()
- tweaked lob and text handling in mapNativeDatatype()
- fixed getTableFieldDefinition()
- use getConnection() to access connection property
- split index and constraint handling
- quote identifiers where possible inside the manager methods depending on
the new 'quote_identifier' option (defaults to off)
- refactored get*Declaration() methods to use getTypeDeclaration()
- setting in_transaction to false on disconnect
- added new Function modules to handle difference in SQL functions
- force rollback() with open transactions on disconnect
- added alterTable() (only does table name change and column adding)
- escape floats to make sure they do not contain evil characters (bug #5608)
- split off manipulation queries into exec() method from the query() method *BC BREAK*
- only if result_types is set to false in prepare() method the query will be
handled as a DML statement *BC BREAK*
- use a proper default value if a field is set to not null in _getDeclaration*() (bug #5930)
- added ability to determine unsigned in mapNativeDatatype()
(only really implemented in the mysql(i) drivers) (bug #6054)
- use lastInsertID() method in nextID()
- added getServerVersion()
- unified array structure in mapNativeDatatype() *BC BREAK*
- added 'mdbtype' to tableInfo() output that is generated from mapNativeDatatype()
- changed 'len' to 'length' in tableInfo() output *BC BREAK*open todo items:
- a number of the manager test cases fail because sqlite does not support adding
primary keys to existing tables
- the alter table test fails because this is unsupported in sqlite2
- the test replace test fails because sqlite reports an incorrect affected rows
value when no existing data was replaced
- the testnow and testsubstring tests fail - 0.1.0 (beta, 2005-06-08)
Release notes
License: BSD License
first unbundled release from MDB2 core
- cosmetic fixes to _getDatabaseFile()
- dont just check for isset() for boolean values in order to support
setting them false as well (bug #4373)
- ensure SQL injection protection in all _quote() methods (was missing in
some decimal, float, time, date and timestamp implementations)
- check if database_name is empty to determine if to connect in connect()
- Warning: there are some serious issues on php5 HEAD on windows
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #5779 | Closed | Bug | 2005-10-25 | _convertEmptyArrayValuesToNull to _fixResultArrayValues | |
| #6490 | Closed | Bug | 2006-01-14 | datatype 'clob' missing in mapNativeDatatype() | |
| #6599 | Closed | Bug | 2006-01-26 | sqlite:///:memory: trys to open file | |
| #8486 | Bogus | Req | 1.2.0 | 2006-08-16 | CONCAT function doesn't exist |
| #9693 | Closed | Bug | 2006-12-25 | database schema change | |
| #9828 | Closed | Bug | 1.3.0 | 2007-01-14 | No check for extension |
| #9884 | Bogus | Req | 1.3.0 | 2007-01-20 | tableinfo function |
| #10027 | Closed | Bug | 1.3.0 | 2007-02-05 | fixes for PHP4 compatibility |
| #10312 | Closed | Bug | 1.3.0 | 2007-03-09 | memory leak |
| #11819 | Closed | Bug | CVS | 2007-08-11 | Add triggers to enforce FOREIGN KEY constraints |
| #13201 | Closed | Bug | 1.4.1 | 2008-02-25 | nextID malfunction |
| #13303 | Closed | Bug | 2008-03-04 | SQLite Manager doesn't return PRIMARY key (autoincrement field) | |
| #14302 | Closed | Bug | 1.4.1 | 2008-07-07 | SQL error produces SQLite error (warning) |
| #16275 | Closed | Req | CVS | 2009-06-01 | deprecated split() use |
| #18316 | Closed | Req | 1.5.0b3 | 2011-02-25 | [PATCH] Add TINYINT to list of coltypes in MDB2_Driver_Reverse_sqlite |