2017 © Pedro Peláez
 

library engineworks-dbal

PHP Database Abstraction Layer

image

eclipxe/engineworks-dbal

PHP Database Abstraction Layer

  • Monday, July 30, 2018
  • by eclipxe
  • Repository
  • 1 Watchers
  • 2 Stars
  • 264 Installations
  • PHP
  • 2 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 20 Versions
  • 4 % Grown

The README.md

eclipxe/engineworks-dbal - Database Abstraction Layer

![Source Code][badge-source] Packagist PHP Version Support ![Latest Version][badge-release] Software License [![Build Status][badge-build]][build] Reliability [![Maintainability][badge-maintainability]][maintainability] Code Coverage [![Violations][badge-violations]][violations] Total Downloads, (*1)

I create this library to abstract the interactions with a relational database. At the time it was created the PDO extension did not exist. If possible try to use PDO instead of this library, mostly because prepared statements., (*2)

I'm maintaining this library because I have several applications depending on it, and I had shared this to other people, so they can also maintain their own projects., (*3)

Installation

To install this library you can use:, (*4)

composer require eclipxe/engineworks-dbal

Objects

EngineWorks\DBAL\DBAL

Main connection object, has several query methods to get the results just as needed. It also contains sql methods to translate SQL Dialects from different drivers., (*5)

EngineWorks\DBAL\Recordset

The Recordset class mimics the main methods of the recordset:, (*6)

  • Open the recordset using an SQL Statement.
  • Walk the recordset using the current cursor.
  • Access values using the values array, stores original values.
  • Use of magic methods Update and Delete.
  • Convert from/to database types to common types.

Some drivers do not know how to get the primary keys on a query, in that case you can specify the entity to affect and also the primary keys., (*7)

Mysql driver support this feature, it will check for primary keys, auto incrementing fields or unique indexes., (*8)

EngineWorks\DBAL\Pager

The Pager class uses Recordset to access a limited page of a query, it does not load all the records but only the requested ones, (*9)

About drivers

This library supports Mysqli, Mssql, Sqlsrv and Sqlite3 drivers, you are free to create your own and (please) share it with me., (*10)

Mysqli

  • This is the most tested driver on production.

Sqlsrv

  • This driver uses Microsoft PHP Driver for SQL Server.
  • Result does not know the entity or primary keys of the query. Use overrideEntity and overrideKeys when create a Recordset for update or delete.

Sqlite3

  • Result does not know the entity or primary keys of the query. Use overrideEntity and overrideKeys when create a Recordset for update or delete.
  • When a result is empty (nothing to fetch) it is not possible to know the type of the fields, this make this driver unstable to update using Recordset.
  • The method SQLite3Result::fetchArray put the cursor in the first position when called after end of list. This behavior has been corrected on Result and fetch returns always false.

Mssql

  • This driver uses PDO dblib, you will need FreeTDS.
  • Result does not know the entity or primary keys of the query. Use overrideEntity and overrideKeys when create a Recordset for update or delete.
  • The function to quote (PDO::quote) fail with multibyte strings, we are using simple replacements of ' to ''
  • This driver is not really compatible with PHP 7, use Sqlsrv instead

Compatibility

This class will be compatible according to PHP Supported versions., (*11)

Contributing

Contributions are welcome! Please read CONTRIBUTING for details and don't forget to take a look in the files TODO and CHANGELOG., (*12)

License

The eclipxe/engineworks-dbal library is copyright © Carlos C Soto and licensed for use under the MIT License (MIT). Please see LICENSE for more information., (*13)

The Versions

30/07 2018

dev-master

9999999-dev https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli sqlite reader sqlite3 sqlsrv recordset database abstraction layer

30/07 2018

v2.0.1

2.0.1.0 https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli reader sqlite3 sqlsrv recordset database abstraction layer

30/07 2018

dev-development

dev-development https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli sqlite reader sqlite3 sqlsrv recordset database abstraction layer

28/07 2018

v2.0.0

2.0.0.0 https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli reader sqlite3 sqlsrv recordset database abstraction layer

27/07 2018

dev-travis

dev-travis https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli sqlite reader recordset database abstraction layer

23/01 2018

v1.7.0

1.7.0.0 https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli sqlite reader recordset database abstraction layer

11/01 2018

v1.6.9

1.6.9.0 https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli sqlite reader recordset database abstraction layer

11/01 2018

v1.6.8

1.6.8.0 https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli sqlite reader recordset database abstraction layer

28/06 2017

v1.6.7

1.6.7.0 https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli sqlite reader recordset database abstraction layer

26/06 2017

v1.6.6

1.6.6.0 https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli sqlite reader recordset database abstraction layer

26/06 2017

v1.6.5

1.6.5.0 https://github.com/eclipxe13/engineworks-dbal

PHP Database Abstraction Layer

  Sources   Download

MIT

The Requires

 

The Development Requires

sql mssql dbal mysqli sqlite reader recordset database abstraction layer

05/05 2017
01/04 2017
23/03 2017
01/03 2017