Download the PHP package stormmore/queries without Composer
On this page you can find all versions of the php package stormmore/queries. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package queries
StormPHP Queries
A lightweight query builder and ORM for PHP. β‘ Fast, intuitive, and flexible β without heavy configuration or boilerplate.
- π Hierarchical models β benefit from ORM features without over-configuration
- π Fluent query builder with modern criteria-finder pattern
- π¦ Zero configuration β no need to describe DB schema
- ποΈ Works with multiple databases (PostgreSQL, MySQL, MariaDB, MSSQL, SQLite)
- π§Ή Lightweight β tidy code, no extra dependencies
- π οΈ Developer-friendly β SQL profiling & logging
Why StormPHP Queries?
Most ORMs are either too heavy or too limited. StormPHP Queries strikes the balance:
- β No configuration required β just connect and start querying
- β Clean domain models β keep your DDD aggregates free from persistence concerns
- β Fluent and flexible API β build simple or complex queries step by step
- β Lightweight and dependency-free β fast to learn, easy to maintain
If you need the power of an ORM combined with the clarity of a query builder β StormPHP Queries is for you.
Quick Start
Installation
Establishing a Connection
StormPHP Queries uses PDO:
Minimal Example
Basic Queries
Find product by ID:
Find all products in a category:
Count products:
Check existence:
Map records to a custom class:
ORM
StormPHP Queries supports mapping query results to classes. Example:
For the ORM to work without additional configuration:
- each record must have a unique identifier (by default id, but this can be changed using the classId parameter),
- tables in the query must have aliases.
This allows StormQueries to map records to user-defined objects, even if the key fields differ from the standard id.
Guide
Looking for more? The full guide includes detailed sections on Select Queries, ORM, Subqueries, Insert/Update/Delete, Union, Profiling, and more.
π Read here: Full Documentation β docs/guide.md
Profiling
You can log queries using callbacks:
Notice
- StormPHP Queries uses PDO.
- Tested with PostgreSQL, MySQL, MariaDB, SQL Server, SQLite.
- Requires PHP 8.0+.
Tests
Run tests using Docker:
Examples
Check the tests directory for more detailed examples.
Contributing
Contributions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m "Add new feature") - Push to your branch (
git push origin feature/your-feature) - Open a Pull Request
Author
MichaΕ Czerski If you have questions or ideas, feel free to reach out on GitHub.
License
StormPHP Queries is licensed under the MIT License.