xref: /netbsd-src/external/public-domain/sqlite/man/SQLITE_IOCAP_ATOMIC.3 (revision 627f7eb200a4419d89b531d55fccd2ee3ffdcde0)
1.Dd December 19, 2018
2.Dt SQLITE_IOCAP_ATOMIC 3
3.Os
4.Sh NAME
5.Nm SQLITE_IOCAP_ATOMIC ,
6.Nm SQLITE_IOCAP_ATOMIC512 ,
7.Nm SQLITE_IOCAP_ATOMIC1K ,
8.Nm SQLITE_IOCAP_ATOMIC2K ,
9.Nm SQLITE_IOCAP_ATOMIC4K ,
10.Nm SQLITE_IOCAP_ATOMIC8K ,
11.Nm SQLITE_IOCAP_ATOMIC16K ,
12.Nm SQLITE_IOCAP_ATOMIC32K ,
13.Nm SQLITE_IOCAP_ATOMIC64K ,
14.Nm SQLITE_IOCAP_SAFE_APPEND ,
15.Nm SQLITE_IOCAP_SEQUENTIAL ,
16.Nm SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN ,
17.Nm SQLITE_IOCAP_POWERSAFE_OVERWRITE ,
18.Nm SQLITE_IOCAP_IMMUTABLE ,
19.Nm SQLITE_IOCAP_BATCH_ATOMIC
20.Nd Device Characteristics
21.Sh SYNOPSIS
22.Fd #define SQLITE_IOCAP_ATOMIC
23.Fd #define SQLITE_IOCAP_ATOMIC512
24.Fd #define SQLITE_IOCAP_ATOMIC1K
25.Fd #define SQLITE_IOCAP_ATOMIC2K
26.Fd #define SQLITE_IOCAP_ATOMIC4K
27.Fd #define SQLITE_IOCAP_ATOMIC8K
28.Fd #define SQLITE_IOCAP_ATOMIC16K
29.Fd #define SQLITE_IOCAP_ATOMIC32K
30.Fd #define SQLITE_IOCAP_ATOMIC64K
31.Fd #define SQLITE_IOCAP_SAFE_APPEND
32.Fd #define SQLITE_IOCAP_SEQUENTIAL
33.Fd #define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
34.Fd #define SQLITE_IOCAP_POWERSAFE_OVERWRITE
35.Fd #define SQLITE_IOCAP_IMMUTABLE
36.Fd #define SQLITE_IOCAP_BATCH_ATOMIC
37.Sh DESCRIPTION
38The xDeviceCharacteristics method of the sqlite3_io_methods
39object returns an integer which is a vector of these bit values expressing
40I/O characteristics of the mass storage device that holds the file
41that the sqlite3_io_methods refers to.
42.Pp
43The SQLITE_IOCAP_ATOMIC property means that all writes of any size
44are atomic.
45The SQLITE_IOCAP_ATOMICnnn values mean that writes of blocks that are
46nnn bytes in size and are aligned to an address which is an integer
47multiple of nnn are atomic.
48The SQLITE_IOCAP_SAFE_APPEND value means that when data is appended
49to a file, the data is appended first then the size of the file is
50extended, never the other way around.
51The SQLITE_IOCAP_SEQUENTIAL property means that information is written
52to disk in the same order as calls to xWrite().
53The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that after reboot
54following a crash or power loss, the only bytes in a file that were
55written at the application level might have changed and that adjacent
56bytes, even bytes within the same sector are guaranteed to be unchanged.
57The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN flag indicates that a file cannot
58be deleted when open.
59The SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on read-only
60media and cannot be changed even by processes with elevated privileges.
61.Pp
62The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying filesystem
63supports doing multiple write operations atomically when those write
64operations are bracketed by SQLITE_FCNTL_BEGIN_ATOMIC_WRITE
65and SQLITE_FCNTL_COMMIT_ATOMIC_WRITE.
66.Sh SEE ALSO
67.Xr sqlite3_io_methods 3 ,
68.Xr SQLITE_FCNTL_LOCKSTATE 3
69