Skip to content

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

@wprzytula

Description

@wprzytula

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions