Search by

noirapi / database

deba12

A strictly typed database abstraction layer over PDO with a query builder and a schema builder (fork of opis/database)

v5.0.0 2026-09-28 11:33 UTC

This package is auto-updated.

Last update: 2026-09-28 11:33:18 UTC


README

Quality

A strictly typed PDO abstraction layer with a fluent query builder and a schema builder, forked from opis/database 4.x.

  • PHP 8.4+, native types everywhere, declare(strict_types=1)
  • Generic fluent API: $db->from('users')->where('id')->is(1)->select()->fetchClass(User::class)->first() is typed as User|false for PHPStan and Psalm
  • Checked with PHPStan (level 10 + strict rules), Psalm (level 1), phpcs (PSR-12 + Slevomat) and PHPMD
  • Dialects: MySQL, PostgreSQL, SQLite and Microsoft SQL Server

Upgrading from opis/database? See UPGRADE.md.

Installation

"repositories": [
    { "type": "git", "url": "git@github.com:noir-framework/database.git" }
],
"require": {
    "noirapi/database": "^5.0"
}

Development

composer check      # phpcs, PHPStan, Psalm, PHPMD and PHPUnit
composer test       # PHPUnit only

License

Apache License, Version 2.0. Original work copyright Zindex Software (see NOTICE).