PHPackages                             hgraca/micro-dbal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. hgraca/micro-dbal

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

hgraca/micro-dbal
=================

A PHP lightweight DBAL client

0.2.1(9y ago)035MITPHPPHP &gt;=7.0

Since Dec 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/hgraca/php-micro-dbal)[ Packagist](https://packagist.org/packages/hgraca/micro-dbal)[ RSS](/packages/hgraca-micro-dbal/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

Hgraca\\MicroDbal
=================

[](#hgracamicrodbal)

[![Author](https://camo.githubusercontent.com/e80528a6fbd7a1766b221b1a32d700b339f6a1992a8e0a1f602d24c256c74d66/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406867726163612d626c75652e7376673f7374796c653d666c61742d737175617265)](https://www.herbertograca.com)[![Software License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Latest Version](https://camo.githubusercontent.com/e820bc1a68ddf9cc4e7c02716544932f9869dff52ba486eec023a931f5ff5c33/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6867726163612f7068702d6d6963726f2d6462616c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/hgraca/php-micro-dbal/releases)[![Total Downloads](https://camo.githubusercontent.com/48ad9df7804789ce3e47479ea584a6c5869a261075a600e2012fbbb994f822c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6867726163612f6d6963726f2d6462616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hgraca/micro-dbal)

[![Build Status](https://camo.githubusercontent.com/c1db8053a0e254d1c8f2d514f0fd2b29196755e5268cf8221dbb8937c82dd78b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f6867726163612f7068702d6d6963726f2d6462616c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hgraca/php-micro-dbal/build)[![Coverage Status](https://camo.githubusercontent.com/4cfe1877a857adcef842190e4fb7304c72a8056d64e7893ee9a5867e707e5f20/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6867726163612f7068702d6d6963726f2d6462616c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hgraca/php-micro-dbal/code-structure)[![Quality Score](https://camo.githubusercontent.com/94811f250288735ee9f061e5f6c3aac3f94717608f560107ef5370e7419db690/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6867726163612f7068702d6d6963726f2d6462616c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hgraca/php-micro-dbal)

A PHP DBAL client

**TODO**: A short description of what is the project. This should explain **what** the project is. **TODO**: A short description of the motivation behind the creation and maintenance of the project. This should explain **why** the project exists.

Usage
-----

[](#usage)

**TODO**: A short explanation of how to use the project. This should explain **how** the project is usable. After installing this in your project, as specified below, you can easily use the CRUD client, ie:

```
$crudClient = new CrudClient(new PdoClient(new PDO($dsn)), new SqlQueryBuilder());

// public function create(string $table, array $data);
$crudClient->create('Employees', ['EmployeeID' => '1', 'Name' => 'Maria]);

// public function read(string $table, array $filter = [], array $orderBy = [], int $limit = 30, int $offset = 1): array;
$crudClient->read('Employees', ['EmployeeID' => '1']);
$crudClient->read('Employees', ['EmployeeID' => ['1', '2', '3']]);

// public function update(string $table, array $data, array $filter = []);
$crudClient->update('Employees', ['Name' => 'Josefina], ['EmployeeID' => '1']);

// public function delete(string $table, array $filter = []);
$crudClient->delete('Employees', ['EmployeeID' => '1']);
```

Or the raw client, ie:

```
$rawClient = new PdoClient(new PDO($dsn);

$rawClient->executeQuery($sql, $bindingsList);
$rawClient->executeCommand($sql, $bindingsList);
```

Installation
------------

[](#installation)

To install the library, run the command below and you will get the latest version:

```
composer require hgraca/micro-dbal
```

Tests
-----

[](#tests)

To run the tests run:

```
make test
```

Or just one of the following:

```
make test-acceptance
make test-functional
make test-integration
make test-unit
make test-humbug
```

To run the tests in debug mode run:

```
make test-debug
```

Coverage
--------

[](#coverage)

To generate the test coverage run:

```
make coverage
```

Code standards
--------------

[](#code-standards)

To fix the code standards run:

```
make cs-fix
```

Todo
----

[](#todo)

- Implement [nested transactions management](http://php.net/manual/en/pdo.begintransaction.php#116669)
- Implement batch update

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

3478d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4af14428505ab93e698bb1fa7a540b0f71dbae0246b6c534f39011aaafc13717?d=identicon)[hgraca](/maintainers/hgraca)

---

Top Contributors

[![hgraca](https://avatars.githubusercontent.com/u/1809002?v=4)](https://github.com/hgraca "hgraca (8 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/hgraca-micro-dbal/health.svg)

```
[![Health](https://phpackages.com/badges/hgraca-micro-dbal/health.svg)](https://phpackages.com/packages/hgraca-micro-dbal)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198628.3k10](/packages/pgvector-pgvector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
