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

Mention that statements should be prepared only once, then executed multiple times #1066

Open
wprzytula opened this issue Aug 26, 2024 · 0 comments
Labels
area/documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@wprzytula
Copy link
Collaborator

A user shared a following doubt:

About using prepare statements in rust driver:

  1. Run prepare once and hold the result in some variable or static. Then we use this variable for every execute.
  2. Run the prepare statement every time before we execute based on it.

I wonder which way is better. As prepare statements has to deal with nodes and caches, I'm not getting useful information from rust driver documentation.

My quick check confirms that the documentation indeed lacks clear information about this. Let's have it spelled out that the first option is preferred.

@wprzytula wprzytula added area/documentation Improvements or additions to documentation good first issue Good for newcomers labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants
@wprzytula and others