driftphp / reactphp-dbal

DBAL for ReactPHP on top of Doctrine
https://driftphp.io
41 stars 6 forks source link

Ability to run native queries #7

Closed enumag closed 4 years ago

enumag commented 4 years ago

With Doctrine's DBAL connection it's a good thing that you're not limited to using the QueryBuilder - it can help you build most queries but when you need something platform-specific you can just pass plain SQL string.

Drift\DBAL\Connection limits the user to QueryBuilder queries. In my opinion there should be a method to execute native queries as well for any edge-cases when QueryBuilder is not an option due to its limits.

mmoreram commented 4 years ago

You can already do that. Remember that you must follow the ? format for parametrization.

$connection->queryBySQL($sql, $params);