Download the PHP package gowork/dqo without Composer
On this page you can find all versions of the php package gowork/dqo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dqo
Database Query Objects
Introduction
DQO provides an object representation of SQL database table, row and select query.
Features:
- Each database table can be described as
Table
class - Enables column name completion in IDE while writing queries
- Provides a table columns enumeration as constants
- Each row returned from SELECT query can be described as
Row
class - Table specific deserialization recipes can be added to corresponding
Row
class Table
andRow
classes code can be generated with Symfony console command- Provides immutable
DatabaseSelectBuilder
for building SELECT queries
DQO is based on Doctrine DBAL and uses Doctrine Types for data deserialization and Doctrine\DBAL\Connection
for query execution.
Table
definition
Classes representing specific database tables. It contains enumeration of table columns as constants and simplifies field aliasing. Multiple instances can be created with different aliases.
TableRow
definition
Classes that can be created to unify data extracting and deserializing from corresponding table.
Building SELECT query with DatabaseSelectBuilder
DatabaseSelectBuilder
simplifies construction of SELECT statements using Table
objects.
SELECT column aliases
By default TableRow
expects that table column used in SELECT part has alias as follows: table_alias.column_name as table_alias_column_name
.
There are 2 ways to create such alias:
-
Use
Table
methods creating column aliases - Use simply
$table->column()
whenselect()
is aftertable()
orjoin()
Query parameters
Query parameters can be specified directly in where/having
method or provided later.
Query parameter types can be specified as where()
argument.
You can also define mapping of parameter classes to proper Doctrine type.
Fetching results
Install
Setup
Symfony
Add the DatabaseAccessGeneratorBundle to your application's kernel (only on dev
environment):
Generate table class
Table query pattern
All queries should extends GW\DQO\Query\AbstractDatabaseQuery
TODO
- [ ] generate queries for tables
- [ ] add command to update table/row with new fields
About
Used at:
All versions of dqo with dependencies
doctrine/dbal Version ^4.0
gowork/values Version ^0.6
gowork/safe Version ^0.2
symfony/console Version ^6.0|^7.0
symfony/dependency-injection Version ^6.0|^7.0
symfony/http-kernel Version ^6.0|^7.0
symfony/config Version ^6.0|^7.0
symfony/process Version ^6.0|^7.0
phpdocumentor/reflection-docblock Version ^5.2
open-serializer/type Version ^0.1
nikic/php-parser Version ^5.0