Search by

kinetis / query-builder

aln-1

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.

Package info

github.com/kinetis-dev/query-builder

pkg:composer/kinetis/query-builder

Statistics

Installs: 42

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.4.1 2026-09-13 14:46 UTC

This package is auto-updated.

Last update: 2026-09-13 15:04:37 UTC


README

Kinetis

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

Packagist Version Packagist Downloads PHP Version License CI

Part of Kinetis, a non-blocking PHP framework for API-first applications, developed in the kinetis-dev/kinetis monorepo.

Parameterized selects, joins, subqueries, set operations, CTEs, row locks, inserts, upserts, updates and deletes over the SQL shared by MySQL 8.4, MariaDB 11.4 and PostgreSQL 16, run through kinetis/persistence's drivers, with row-to-DTO mapping via Kinetis\Validation\Hydrator. Not an ORM: no relationships, 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); // OrderRow is your own row DTO

The connection's type selects the SQL dialect, and a Query built on a transaction runs inside it.

Installation

composer require kinetis/query-builder

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

License

MIT — see LICENSE.