PHPackages                             initorm/database - 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. initorm/database

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

initorm/database
================

Database manager that composes initorm/dbal and initorm/query-builder into a fluent CRUD + transaction + query-log API with an optional static facade.

2.0.0(1mo ago)01051MITPHPPHP ^8.1CI passing

Since Dec 9Pushed 3w agoCompare

[ Source](https://github.com/InitORM/Database)[ Packagist](https://packagist.org/packages/initorm/database)[ Docs](https://github.com/InitORM/Database)[ GitHub Sponsors](https://github.com/muhammetsafak)[ RSS](/packages/initorm-database/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (7)Versions (7)Used By (1)

InitORM Database
================

[](#initorm-database)

Composes [`initorm/dbal`](https://github.com/InitORM/DBAL) (PDO connection + result mapper) and [`initorm/query-builder`](https://github.com/InitORM/QueryBuilder) (fluent SQL builder) into a single Database manager with CRUD helpers, transactions, query logging, and an optional static facade.

[![Latest Stable Version](https://camo.githubusercontent.com/907c6bab20e0ff487ea318f2b96b5bbb58b71db9f94d4d25607b11720c4a461e/687474703a2f2f706f7365722e707567782e6f72672f696e69746f726d2f64617461626173652f76)](https://packagist.org/packages/initorm/database)[![Total Downloads](https://camo.githubusercontent.com/9c4c39a47290af207a4b33d7412efc6611f92cb60a1ad8d57c9deedbd711c2aa/687474703a2f2f706f7365722e707567782e6f72672f696e69746f726d2f64617461626173652f646f776e6c6f616473)](https://packagist.org/packages/initorm/database)[![License](https://camo.githubusercontent.com/958dfc3644553d5a7fefc7f0d5d08738809eec8a72559d88f5254524e7f0e77c/687474703a2f2f706f7365722e707567782e6f72672f696e69746f726d2f64617461626173652f6c6963656e7365)](https://packagist.org/packages/initorm/database)[![PHP Version Require](https://camo.githubusercontent.com/d04f19b60e05fa1568cbcff139cace6849e15fcd65329ad6c4e584daf159a1e5/687474703a2f2f706f7365722e707567782e6f72672f696e69746f726d2f64617461626173652f726571756972652f706870)](https://packagist.org/packages/initorm/database)[![PHPUnit](https://github.com/InitORM/Database/actions/workflows/phpunit.yml/badge.svg)](https://github.com/InitORM/Database/actions/workflows/phpunit.yml)[![PHPStan](https://github.com/InitORM/Database/actions/workflows/phpstan.yml/badge.svg)](https://github.com/InitORM/Database/actions/workflows/phpstan.yml)[![PHP_CodeSniffer](https://github.com/InitORM/Database/actions/workflows/phpcs.yml/badge.svg)](https://github.com/InitORM/Database/actions/workflows/phpcs.yml)

---

Requirements
------------

[](#requirements)

- **PHP 8.1 or later**
- `ext-pdo`
- One of `ext-pdo_mysql`, `ext-pdo_pgsql`, or `ext-pdo_sqlite` depending on the database you target.

Supported databases
-------------------

[](#supported-databases)

Any database with a PDO driver that follows standard SQL works out of the box. The query builder ships dialect-aware identifier quoting for **MySQL/MariaDB**, **PostgreSQL**, and **SQLite**; for everything else (`oci`, `sqlsrv`, …) it falls back to a generic, no-escaping driver.

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

[](#installation)

```
composer require initorm/database
```

---

Quick start
-----------

[](#quick-start)

```
