Skip to content

Commit c3a65cd

Browse files
Add comment
1 parent b12da7d commit c3a65cd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sqlitecluster/SQLite.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@ class SQLite {
265265
// no commits can happen "late" from slow threads that could otherwise write to a DB being shutdown.
266266
void setCommitEnabled(bool enable);
267267

268+
// This gets a set of sqlite3 prepared statements from a query string, to allow for the methods here to be called
269+
// without actually running a query:
270+
// https://www.sqlite.org/c3ref/stmt.html
271+
//
272+
// For instance, you can determine if a query is read-only with this information. This returns a list as it's
273+
// possible that a string contains multiple queries separated by semicolons.
274+
// Note: It's up to the caller to free these prepared statements by calling `sqlite3_finalize()` on them.
275+
// This returns an sqlite error code. It will stop parsing multiple statements after the first error.
268276
int getPreparedStatements(const string& query, list<sqlite3_stmt*>& statements);
269277

270278
private:

0 commit comments

Comments
 (0)