Skip to content

Commit d416b40

Browse files
committed
extend on reset() vs clearBindings()
1 parent ecc89c1 commit d416b40

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

include/SQLiteCpp/Statement.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ class Statement
8686
/// The finalization will be done by the destructor of the last shared pointer
8787
~Statement() = default;
8888

89-
/// Reset the statement to make it ready for a new execution. Throws an exception on error.
89+
/// Reset the statement to make it ready for a new execution by calling sqlite3_reset.
90+
/// Throws an exception on error.
91+
/// Call this function before any news calls to bind() if the statement was already executed before.
92+
/// Calling reset() does not clear the bindings (see clearBindings()).
9093
void reset();
9194

9295
/// Reset the statement. Returns the sqlite result code instead of throwing an exception on error.

src/Statement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Statement::Statement(Statement&& aStatement) noexcept :
4343
aStatement.mbDone = false;
4444
}
4545

46-
// Reset the statement to make it ready for a new execution (see also #clearBindings() bellow)
46+
// Reset the statement to make it ready for a new execution (see also #clearBindings() below)
4747
void Statement::reset()
4848
{
4949
const int ret = tryReset();

0 commit comments

Comments
 (0)