Download the PHP package celema/quma without Composer
On this page you can find all versions of the php package celema/quma. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package quma
Short Description A no-ORM database library for executing raw SQL files
License MIT
Homepage https://celema.dev/quma
Informations about the package quma
Celema Quma
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
Quma currently requires:
- PHP 8.5 or newer
ext-jsonext-pdoext-readline
Install
Quickstart
Create a SQL directory structure like this:
Add a query file:
Then configure Quma and run the query:
Quma maps directories to properties and files to methods:
sql/users/byId.sqlbecomes$db->users->byId()sql/users/list.sqlbecomes$db->users->list()
What Quma provides
- SQL-file based queries with positional or named parameters
- explicit static
/*:name:*/placeholders for trusted driver-aware configuration fragments - PDO-backed execution with exact
one(), stablefirst(), cursor-stylefetch(),all(),lazy(),run(), andlen() - optional row hydration into typed objects
- PHP-powered SQL templates via
.tpqlfiles - multiple SQL directories with driver-specific overrides
- migration commands for
.sql,.tpql, and.phpmigrations - environment-controlled debug output for translated and interpolated SQL
Documentation
Start with the docs in docs/index.md.
Recommended pages:
- Getting started
- Query files
- Parameters and results
- Templates
- Migrations overview
- CLI
- Testing
Testing
Quma runs against SQLite by default and can also run against MySQL and PostgreSQL when you provide test databases.
For database setup and environment variables, see docs/testing.md.
License
This project is licensed under the MIT license.
All versions of quma with dependencies
ext-json Version *
ext-pdo Version *
ext-readline Version *
celema/console Version ^0.5