xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_txn_state.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE3_TXN_STATE 3
3.Os
4.Sh NAME
5.Nm sqlite3_txn_state
6.Nd determine the transaction state of a database
7.Sh SYNOPSIS
8.In sqlite3.h
9.Ft int
10.Fo sqlite3_txn_state
11.Fa "sqlite3*"
12.Fa "const char *zSchema"
13.Fc
14.Sh DESCRIPTION
15The sqlite3_txn_state(D,S) interface returns the current transaction state
16of schema S in database connection D.
17If S is NULL, then the highest transaction state of any schema on database
18connection D is returned.
19Transaction states are (in order of lowest to highest):
20.Bl -enum
21.It
22SQLITE_TXN_NONE
23.It
24SQLITE_TXN_READ
25.It
26SQLITE_TXN_WRITE
27.El
28.Pp
29If the S argument to sqlite3_txn_state(D,S) is not the name of a valid
30schema, then -1 is returned.
31.Sh IMPLEMENTATION NOTES
32These declarations were extracted from the
33interface documentation at line 6655.
34.Bd -literal
35SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
36.Ed
37.Sh SEE ALSO
38.Xr SQLITE_TXN_NONE 3
39