praeclarum / praeclarum/sqlite-net

The right way to do prepared statements

Open
#89 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.5k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

How do I use sqlite-net to properly do prepared statements? For a while I was doing

cmd = conn.CreateCommand (....);

cmd.Bind("@var", "some value");
cmd.ExecuteNonQuery();
cmd.Bind("@var", "another value");
cmd.ExecuteNonQuery();

After about 2000 times, there is general badness, because now if you look at the command, there are 2000 bindings! It just adds it to the list. Do I need to somehow clear the Bind? Should it check and replace internally?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the CreateCommand, Bind, and ExecuteNonQuery usage shown in the issue and inspect how bindings are stored across repeated executions. Done means repeated binding and execution no longer accumulates obsolete bindings, or the supported way to clear or replace them is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sqlite
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.