quellabs / objectquel
A sophisticated ORM system with a unique query language and streamlined architecture
Installs: 97
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/quellabs/objectquel
Requires
- ext-curl: *
- ext-fileinfo: *
- ext-gd: *
- ext-json: *
- ext-mysqli: *
- ext-pdo: *
- cakephp/database: *
- quellabs/annotation-reader: ^1.
- quellabs/contracts: ^1.
- quellabs/dependency-injection: ^1.
- quellabs/sculpt: ^1.
- quellabs/signal-hub: ^1.
- quellabs/support: ^1.
- robmorgan/phinx: *
- softcreatr/jsonpath: *
- dev-main
- 1.0.61
- 1.0.60
- 1.0.59
- 1.0.58
- 1.0.57
- 1.0.56
- 1.0.55
- 1.0.54
- 1.0.53
- 1.0.52
- 1.0.51
- 1.0.50
- 1.0.49
- 1.0.48
- 1.0.47
- 1.0.46
- 1.0.45
- 1.0.44
- 1.0.43
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-feature/linear-array
- dev-feature/collection-filtering
This package is auto-updated.
Last update: 2026-02-10 07:09:07 UTC
README
A domain-level query engine with integrated ORM capabilities, built on the Data Mapper pattern. ObjectQuel provides a purpose-built query language for expressing complex data relationships naturally, powered by CakePHP's database foundation under the hood.
Why ObjectQuel?
ORMs force you to choose: readable code or powerful queries. Query builders are verbose. DQL is SQL with extra steps. ObjectQuel takes a different approach — a declarative query language inspired by QUEL that works at the entity level, not the table level.
// Relationships, filtering, regex, aliasing — in readable syntax $results = $entityManager->executeQuery(" range of p is App\\Entity\\Product range of c is App\\Entity\\Category via p.categories retrieve (p, c.name as categoryName) where p.price < :maxPrice and c.active = true ", [ 'maxPrice' => 50.00 ]);
The query engine decomposes this into optimized SQL, handles joins from your entity relationships, and hydrates the results — while the syntax stays close to what you actually mean.
Installation
composer require quellabs/objectquel
Quick Start
use Quellabs\ObjectQuel\Configuration; use Quellabs\ObjectQuel\EntityManager; $config = new Configuration(); $config->setEntityNamespace('App\\Entity'); $config->setEntityPath(__DIR__ . '/src/Entity'); $entityManager = new EntityManager($config, $connection); // Standard ORM operations $product = $entityManager->find(Product::class, 101); $active = $entityManager->findBy(Product::class, ['active' => true]); // ObjectQuel for complex queries $results = $entityManager->executeQuery(" range of p is App\\Entity\\Product retrieve (p) where p.name = /^Tech/i sort by p.createdAt desc ");
What Makes the Query Language Different
ObjectQuel isn't SQL with renamed keywords. The abstraction layer enables things SQL can't do natively:
- Pattern matching —
p.name = "abc*xyz"orp.name = /^a/iinstead of verboseLIKE/REGEXPsyntax - Full-text search —
search(p.name, "banana +pear -apple")with weight support - Existence checks —
ANY(o.orderId)in bothretrieveandwhereclauses - Relationship traversal —
viakeyword resolves entity relationships without manual joins - Hybrid data sources — combine database queries with external JSON sources
- Query decomposition — the engine splits complex queries into optimized sub-tasks automatically
ORM Features
Beyond the query language, ObjectQuel provides a full Data Mapper ORM:
- Annotation-based entity mapping with
@Orm\Table,@Orm\Column - OneToOne, ManyToOne, OneToMany, and ManyToMany relationships via bridge entities
- Unit of Work with change tracking, persist, and flush
- Lazy loading with configurable proxy generation
- Immutable entities for views and read-only tables
- Custom repositories
- Lifecycle events via SignalHub (pre/post persist, update, delete)
- Database migrations powered by Phinx
- CLI tooling:
make:entity,make:entity-from-table,make:migrations,quel:migrate
Documentation
Full docs, query language reference, and entity mapping guide: objectquel.com/docs
License
MIT