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

Question: Using prepared query with Pool #295

Open
WillCauldron opened this issue Jun 21, 2023 · 0 comments
Open

Question: Using prepared query with Pool #295

WillCauldron opened this issue Jun 21, 2023 · 0 comments

Comments

@WillCauldron
Copy link

tl;dr is it possible to create a prepared statement and submit to the pool, rather than manually opening a connection and submitting the query there?

First, having previously worked on a project with a much older version of this library, I'm in adoration of the new features available in v4+. Particularly the Pool and Prepared Statements. So many thanks for these excellent additions.

I'd like to make use of the prepared statements feature, to better optimise some repeated calls to the database. However, I'm struggling to work out how you would combine this with the Pool logic. I can't see a route by which you could create a prepared statement without first needing a connection, nor a way of requesting a connection from the pool directly.

Is there an existing route for combining these two features?

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

1 participant