xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_get_autocommit.3 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.Dd March 11, 2017
2.Dt SQLITE3_GET_AUTOCOMMIT 3
3.Os
4.Sh NAME
5.Nm sqlite3_get_autocommit
6.Nd Test For Auto-Commit Mode
7.Sh SYNOPSIS
8.Ft int
9.Fo sqlite3_get_autocommit
10.Fa "sqlite3*"
11.Fc
12.Sh DESCRIPTION
13The sqlite3_get_autocommit() interface returns non-zero or zero if
14the given database connection is or is not in autocommit mode, respectively.
15Autocommit mode is on by default.
16Autocommit mode is disabled by a BEGIN statement.
17Autocommit mode is re-enabled by a COMMIT or ROLLBACK.
18.Pp
19If certain kinds of errors occur on a statement within a multi-statement
20transaction (errors including SQLITE_FULL, SQLITE_IOERR,
21SQLITE_NOMEM, SQLITE_BUSY, and SQLITE_INTERRUPT)
22then the transaction might be rolled back automatically.
23The only way to find out whether SQLite automatically rolled back the
24transaction after an error is to use this function.
25.Pp
26If another thread changes the autocommit status of the database connection
27while this routine is running, then the return value is undefined.
28.Sh SEE ALSO
29.Xr SQLITE_OK 3
30