1.Dd January 24, 2024 2.Dt SQLITE3_STMT_BUSY 3 3.Os 4.Sh NAME 5.Nm sqlite3_stmt_busy 6.Nd determine if a prepared statement has been reset 7.Sh SYNOPSIS 8.In sqlite3.h 9.Ft int 10.Fo sqlite3_stmt_busy 11.Fa "sqlite3_stmt*" 12.Fc 13.Sh DESCRIPTION 14The sqlite3_stmt_busy(S) interface returns true (non-zero) if the prepared statement 15S has been stepped at least once using sqlite3_step(S) 16but has neither run to completion (returned SQLITE_DONE 17from sqlite3_step(S)) nor been reset using sqlite3_reset(S). 18The sqlite3_stmt_busy(S) interface returns false if S is a NULL pointer. 19If S is not a NULL pointer and is not a pointer to a valid prepared statement 20object, then the behavior is undefined and probably undesirable. 21.Pp 22This interface can be used in combination 23.Fn sqlite3_next_stmt 24to locate all prepared statements associated with a database connection 25that are in need of being reset. 26This can be used, for example, in diagnostic routines to search for 27prepared statements that are holding a transaction open. 28.Sh IMPLEMENTATION NOTES 29These declarations were extracted from the 30interface documentation at line 4464. 31.Bd -literal 32SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); 33.Ed 34.Sh SEE ALSO 35.Xr sqlite3_next_stmt 3 , 36.Xr sqlite3_stmt 3 , 37.Xr SQLITE_OK 3 38