1.Dd January 24, 2024 2.Dt SQLITE3_STMT 3 3.Os 4.Sh NAME 5.Nm sqlite3_stmt 6.Nd prepared statement object 7.Sh SYNOPSIS 8.In sqlite3.h 9.Vt typedef struct sqlite3_stmt sqlite3_stmt; 10.Sh DESCRIPTION 11An instance of this object represents a single SQL statement that has 12been compiled into binary form and is ready to be evaluated. 13.Pp 14Think of each SQL statement as a separate computer program. 15The original SQL text is source code. 16A prepared statement object is the compiled object code. 17All SQL must be converted into a prepared statement before it can be 18run. 19.Pp 20The life-cycle of a prepared statement object usually goes like this: 21.Bl -enum 22.It 23Create the prepared statement object using 24.Fn sqlite3_prepare_v2 . 25.It 26Bind values to parameters using the sqlite3_bind_*() interfaces. 27.It 28Run the SQL by calling 29.Fn sqlite3_step 30one or more times. 31.It 32Reset the prepared statement using 33.Fn sqlite3_reset 34then go back to step 2. 35Do this zero or more times. 36.It 37Destroy the object using 38.Fn sqlite3_finalize . 39.El 40.Pp 41.Sh IMPLEMENTATION NOTES 42These declarations were extracted from the 43interface documentation at line 4000. 44.Bd -literal 45typedef struct sqlite3_stmt sqlite3_stmt; 46.Ed 47.Sh SEE ALSO 48.Xr sqlite3_finalize 3 , 49.Xr sqlite3_prepare 3 , 50.Xr sqlite3_reset 3 , 51.Xr sqlite3_step 3 52