zk2 / sps-dbal-component
SQL query builder for Doctrine DBAL
Installs: 2 524
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.2
- ext-pdo: *
- doctrine/collections: ^2.0
- doctrine/common: ^3.0
- doctrine/dbal: ^3.0 || ^4
Requires (Dev)
- ext-json: *
- firehed/dbal-logger: ^1.0
- monolog/monolog: ^2.1
- phpunit/phpunit: ^9.5
- symfony/dotenv: ^6.4
- symfony/var-dumper: ^6.4
README
Often there is a need to provide the end user with the possibility of complex filtering any data. It is quite problematic to correctly place parentheses in the AND / OR set. It is even more problematic to filter / sort by value from the aggregating function.
The component is intended for building valid blocks "WHERE", "OFFSET", "LIMIT" and "ORDER BY"
in Doctrine\DBAL\Query\QueryBuilder
.
Also, the component allows you to use result of aggregating functions in the blocks
"WHERE" and "ORDER BY".
Documentation
Running the Tests
Environment for tests inside Docker
It provides 3 DataBase engine (MySql, Postgres and SQLite) with fixtures.
For run tests:
cd tests/docker
docker-compose up -d
docker-compose exec php ./vendor/bin/phpunit
License
This bundle is released under the MIT license. See the complete license in the bundle:
LICENSE