PHPackages                             celema/quma - 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. celema/quma

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

celema/quma
===========

A no-ORM database library for executing raw SQL files

0.4.0(1mo ago)055↓66.7%MITPHPPHP ^8.5CI passing

Since Jan 31Pushed 1w ago1 watchersCompare

[ Source](https://github.com/celemas/quma)[ Packagist](https://packagist.org/packages/celema/quma)[ Docs](https://celema.dev/quma)[ RSS](/packages/celema-quma/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

Celema Quma
===========

[](#celema-quma)

[![ci](https://camo.githubusercontent.com/9f7ad5ff37f5749389adecbd70482754bcdb095b374a6ea246faf6550f2ba653/68747470733a2f2f636f6465666c6f652e636f6d2f63656c656d612f71756d612f6261646765732f776f726b666c6f77732f63692e796d6c2f62616467652e7376673f7374796c653d666c6174266c6f676f3d666f7267656a6f266c6f676f436f6c6f723d7768697465266c6162656c3d6369)](https://codefloe.com/celema/quma/actions)[![code coverage](https://camo.githubusercontent.com/a9d097cc93ad4316d1d7a7778a84149c7efc62108a6cc9eaa39befe66581f722/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246636f762e63656c656d612e64657625324663656c656d6125324671756d61253246636f646525324662616467652e6a736f6e)](https://cov.celema.dev/celema/quma/code)[![type coverage](https://camo.githubusercontent.com/ad4108f3d0d899099479c43f340208d926f434262dba9edde44b59ed005e7857/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246636f762e63656c656d612e64657625324663656c656d6125324671756d61253246747970657325324662616467652d636f7665722e6a736f6e)](https://cov.celema.dev/celema/quma/types)[![psalm level](https://camo.githubusercontent.com/80ac6459ad363621e87b6ddd618840f14e6954c27529fa9be5ba6014f72b9045/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246636f762e63656c656d612e64657625324663656c656d6125324671756d61253246747970657325324662616467652d6c6576656c2e6a736f6e)](https://cov.celema.dev/celema/quma/types)[![Software License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE.md)

Quma is a no-ORM database library for PHP. You store SQL in files, group those files in folders, and execute them through a small PDO-backed API. Quma also ships with template queries and a migration runner.

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

[](#requirements)

Quma currently requires:

- PHP 8.5 or newer
- `ext-json`
- `ext-pdo`
- `ext-readline`

Install
-------

[](#install)

```
composer require celema/quma
```

Quickstart
----------

[](#quickstart)

Create a SQL directory structure like this:

```
sql/
  users/
    byId.sql
    list.sql

```

Add a query file:

```
SELECT id, email FROM users WHERE id = ?;
```

Then configure Quma and run the query:

```
