Doctrine DBAL

[GH-277] Remove duplicate SQL parts in query generation