xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_reset.3 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.Dd March 11, 2017
2.Dt SQLITE3_RESET 3
3.Os
4.Sh NAME
5.Nm sqlite3_reset
6.Nd Reset A Prepared Statement Object
7.Sh SYNOPSIS
8.Ft int
9.Fo sqlite3_reset
10.Fa "sqlite3_stmt *pStmt"
11.Fc
12.Sh DESCRIPTION
13The sqlite3_reset() function is called to reset a prepared statement
14object back to its initial state, ready to be re-executed.
15Any SQL statement variables that had values bound to them using the
16 sqlite3_bind_*() API retain their values.
17Use sqlite3_clear_bindings() to reset the bindings.
18.Pp
19The sqlite3_reset(S) interface resets the prepared statement
20S back to the beginning of its program.
21.Pp
22If the most recent call to sqlite3_step(S) for the prepared statement
23S returned SQLITE_ROW or SQLITE_DONE, or if sqlite3_step(S)
24has never before been called on S, then sqlite3_reset(S)
25returns SQLITE_OK.
26.Pp
27If the most recent call to sqlite3_step(S) for the prepared statement
28S indicated an error, then sqlite3_reset(S) returns
29an appropriate error code.
30.Pp
31The sqlite3_reset(S) interface does not change the
32values of any bindings on the prepared statement
33S.
34.Sh SEE ALSO
35.Xr sqlite3_stmt 3 ,
36.Xr sqlite3_bind_blob 3 ,
37.Xr sqlite3_clear_bindings 3 ,
38.Xr SQLITE_OK 3
39