1.Dd March 11, 2017 2.Dt SQLITE3_STMT 3 3.Os 4.Sh NAME 5.Nm sqlite3_stmt 6.Nd Prepared Statement Object 7.Sh SYNOPSIS 8.Vt typedef struct sqlite3_stmt sqlite3_stmt; 9.Sh DESCRIPTION 10An instance of this object represents a single SQL statement that has 11been compiled into binary form and is ready to be evaluated. 12.Pp 13Think of each SQL statement as a separate computer program. 14The original SQL text is source code. 15A prepared statement object is the compiled object code. 16All SQL must be converted into a prepared statement before it can be 17run. 18.Pp 19The life-cycle of a prepared statement object usually goes like this: 20.Bl -enum 21.It 22Create the prepared statement object using sqlite3_prepare_v2(). 23.It 24Bind values to parameters using the sqlite3_bind_*() interfaces. 25.It 26Run the SQL by calling sqlite3_step() one or more times. 27.It 28Reset the prepared statement using sqlite3_reset() then 29go back to step 2. 30Do this zero or more times. 31.It 32Destroy the object using sqlite3_finalize(). 33.El 34.Pp 35.Sh SEE ALSO 36.Xr sqlite3_finalize 3 , 37.Xr sqlite3_prepare 3 , 38.Xr sqlite3_reset 3 , 39.Xr sqlite3_step 3 40