Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to run native queries #7

Closed
enumag opened this issue Feb 24, 2020 · 1 comment
Closed

Ability to run native queries #7

enumag opened this issue Feb 24, 2020 · 1 comment

Comments

@enumag
Copy link
Contributor

enumag commented Feb 24, 2020

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.

@enumag enumag closed this as completed Feb 24, 2020
@mmoreram
Copy link
Member

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants