Flow Dbal Query Builder
In Doctrine Dbal Adapter the most frequently used extractors are those based on Doctrine Dbal Query Builder.
The problem with Dbal Query Builder is that it does not support many important SQL features that are db engine specific, like for example:
- WITH (Common Table Expression)
- LATERAL JOINS
It also does not expose Query Parts which are pretty important to understand passed query and decide how to deal with it.
Since Dbal QueryBuilder is pretty much an independent mechanism for building sql queries I think we can either:
- extend it and add missing features
- build new one based on the dbal one
would it not be easier to just support raw PDO queries if users want to write more complex queries?
would it not be easier to just support raw PDO queries if users want to write more complex queries?
That would be ideal, but the main problem is that we need to be able to programmatically change passed query (for pagination). So regardless if this is going to be a PDO or Dbal we still need that query builder :|
Which means that probably a dedicated query builder would be required anyway. But once we get one, it would be irrelevant what's under the hood, PDO or Dbal as it would anyway just return a sql query string.
The problem with moving towards pure PDO is that we would also need to create something similar to flow-php/doctrine-dbal-bulk