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

Prepared Statement Example #236

Open
montu1996 opened this issue Aug 20, 2024 · 1 comment
Open

Prepared Statement Example #236

montu1996 opened this issue Aug 20, 2024 · 1 comment
Assignees

Comments

@montu1996
Copy link

Can someone shared how to use prepared statement with golang driver ?

@dkropachev dkropachev self-assigned this Aug 20, 2024
@dkropachev
Copy link
Collaborator

dkropachev commented Aug 20, 2024

It is done automatically, every connection (Conn) contains cache of prepared statements, if your query contains select, insert, update, delete or batch it will be prepared before execution, cached and reused for any query with the sameQuery.stmt on the same connection (Conn).
If you feel that it does not match your use case, feel free to outline it and let's start discussion on how to address it.
Also let me know if this implementation is okay with you so that I could close an issue.

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

No branches or pull requests

2 participants