xref: /netbsd-src/external/public-domain/sqlite/man/SQLITE_TXN_NONE.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE_TXN_NONE 3
3.Os
4.Sh NAME
5.Nm SQLITE_TXN_NONE ,
6.Nm SQLITE_TXN_READ ,
7.Nm SQLITE_TXN_WRITE
8.Nd allowed return values from sqlite3_txn_state()
9.Sh SYNOPSIS
10.In sqlite3.h
11.Fd #define SQLITE_TXN_NONE
12.Fd #define SQLITE_TXN_READ
13.Fd #define SQLITE_TXN_WRITE
14.Sh DESCRIPTION
15These constants define the current transaction state of a database
16file.
17The sqlite3_txn_state(D,S) interface returns
18one of these constants in order to describe the transaction state of
19schema S in database connection D.
20.Bl -tag -width Ds
21.It SQLITE_TXN_NONE
22The SQLITE_TXN_NONE state means that no transaction is currently pending.
23.It SQLITE_TXN_READ
24The SQLITE_TXN_READ state means that the database is currently in a
25read transaction.
26Content has been read from the database file but nothing in the database
27file has changed.
28The transaction state will advanced to SQLITE_TXN_WRITE if any changes
29occur and there are no other conflicting concurrent write transactions.
30The transaction state will revert to SQLITE_TXN_NONE following a ROLLBACK
31or COMMIT.
32.It SQLITE_TXN_WRITE
33The SQLITE_TXN_WRITE state means that the database is currently in
34a write transaction.
35Content has been written to the database file but has not yet committed.
36The transaction state will change to to SQLITE_TXN_NONE at the next
37ROLLBACK or COMMIT.
38.Sh IMPLEMENTATION NOTES
39These declarations were extracted from the
40interface documentation at line 6673.
41.Bd -literal
42#define SQLITE_TXN_NONE  0
43#define SQLITE_TXN_READ  1
44#define SQLITE_TXN_WRITE 2
45.Ed
46.Sh SEE ALSO
47.Xr sqlite3 3
48