A powerful abstraction layer for database. Fast & Safe.
- MySQL via mysqli extension,
- PostgreSQL via pgsql extension,
- MS SQL Server via sqlsrv extension.
$ composer require nextras/dbal
Docs & sources
This project is inspired by great libraries:
MIT. See full license.
v3.0.0-rc1 3.0.0 RC1
The first RC of 3.0.0 is out.
Notable BC breaks:
- Library requires PHP 7.0+ version.
- Date-time fields are converted to DateTimeImmutable instances.
- Date-time changes:
%dtsdoes not do any timezone modifications (removed simpleStorageTz), read more in documentation and see the usage matrix.
- Connection::ping() does not connect when connection is not connected.
Notable features & changes:
- Connection: added nested transactions & savepoints.
- Connection: added setter for transation isolation level.
- Added %json modifier.
- Added factory for
- Added SqlSrv driver & MSSQL support.
- Enhanced Tracy's panel - added elapsed time, explain, updated visual design.
- See full commit changelog since 2.1 version.
Next minor version 2.1.0 is out!
Next major version 2.0.0 is out!
- BC breaks:
- New features:
- Nette Extension: added support for multiple instances with autowired [bc406a8]
- SqlProcessor: added
%_like_placeholder, #9 [00a1833]
- SqlProcessor: added support for insert into table with all default values [96698e0]
- Connection::queryArgs accepts only an array [7a3474a]
- added QueryBuilder::getLimitOffsetClause() [2a89af2]
- added IPlatform::getSequenceName() [91fe03f]
- added IPlatform::getName() [fe3f3f8]
- added CachedPlafom [ccbfd48]
- See full commit changelog since version 1.1.
v2.0.0-rc1 2.0.0 RC1
Next major beta version 2.0.0-rc1 is out!
- No changes since 2.0.0-beta3.
- See full commit changelog since v1.1
v2.0.0-beta2 2.0.0 BETA 2
Next major beta version 2.0.0-beta2 is out! What's changed?
- added IPlatform::getName();
- added IPlatform::getPrimarySequenceName();
- added CachedPlatform class;
- see full commit changelog
Bugfix version 1.1.1 is out!
🍏: What's new?
Minor version 1.0.1 is out!
🍍: What's new?
Bugfix version 1.0.1 is out!
v1.0.0 Dbal 1.0.0
The first stable release of Nextras DBAL.
v1.0.0-RC3 Dbal 1.0.0-RC3
Changes against 1.0.0-RC2:
- !!! new: exceptions refactored to base project namespace (from Excetion subnamespace) - BC BREAK!!!
- !!! new: MySQL uses TRADITIONAL sql mode by default - BC BREAK!!!
- fix: Connection::ping() connects to database.
- fix: PgsqlDriver::getLastInsertedId() throws exception when sequence name is not provided.
- fix: Connection throws exception when driver is not defined.
- fix: PgsqlDriver supports %dt modifier for timestamp column.
- add: Connection::createQueryBuilder() method
v1.0.0-RC2 Dbal 1.0.0-RC2
Changes against 1.0.0-RC1:
- added method Result::fetchAll()
- added method Result::fetchPairs()
- added support for escaping % sign for SqlProcessor (use doubled %)
- fixed Result::seek() fetching current row immediately