kinetis/query-builder

A thin, parameterized SQL query builder for Kinetis — MySQL and Postgres via kinetis/persistence's drivers, row-to-DTO mapping via Kinetis\Validation\Hydrator. Not an ORM: no relationships, no migrations, no change-tracking.

Maintainers

Package info

github.com/kinetis-dev/query-builder

pkg:composer/kinetis/query-builder

Transparency log

Statistics

Installs: 62

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.4 2026-08-16 08:57 UTC

This package is auto-updated.

Last update: 2026-08-16 08:57:31 UTC


README

Kinetis

kinetis/query-builder
A thin, parameterized SQL query builder for Kinetis

Packagist Version Packagist Downloads PHP Version License CI

MySQL and Postgres via amphp/mysql/amphp/postgres, with row-to-DTO mapping via Kinetis\Validation\Hydrator — the same mechanism that hydrates a #[Body] request DTO. Not an ORM: no relationships, no migrations, no change-tracking, no save()-on-a-model.

use Kinetis\QueryBuilder\Query;

$orders = new Query($db)
    ->table('orders')
    ->where('customer_id', '=', $customerId)
    ->where('status', '!=', 'cancelled')
    ->orderBy('created_at', 'desc')
    ->limit(20)
    ->get(OrderRow::class);

Query works with either backend through the same shared Amp\Sql\SqlLink family both drivers implement, auto-detected from the concrete connection you pass in — and composes directly inside Kinetis\Persistence\TransactionGuard::transaction().

Installation

composer require kinetis/query-builder

Requires PHP 8.4+ and kinetis/framework. Full documentation: docs.kinetis.dev/query-builder.html.

License

MIT — see LICENSE.