xref: /netbsd-src/external/public-domain/sqlite/man/SQLITE_IOCAP_ATOMIC.3 (revision a24efa7dea9f1f56c3bdb15a927d3516792ace1c)
1.Dd $Mdocdate$
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.Nd Device Characteristics
19.Sh SYNOPSIS
20.Fd #define SQLITE_IOCAP_ATOMIC
21.Fd #define SQLITE_IOCAP_ATOMIC512
22.Fd #define SQLITE_IOCAP_ATOMIC1K
23.Fd #define SQLITE_IOCAP_ATOMIC2K
24.Fd #define SQLITE_IOCAP_ATOMIC4K
25.Fd #define SQLITE_IOCAP_ATOMIC8K
26.Fd #define SQLITE_IOCAP_ATOMIC16K
27.Fd #define SQLITE_IOCAP_ATOMIC32K
28.Fd #define SQLITE_IOCAP_ATOMIC64K
29.Fd #define SQLITE_IOCAP_SAFE_APPEND
30.Fd #define SQLITE_IOCAP_SEQUENTIAL
31.Fd #define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
32.Fd #define SQLITE_IOCAP_POWERSAFE_OVERWRITE
33.Sh DESCRIPTION
34The xDeviceCharacteristics method of the sqlite3_io_methods
35object returns an integer which is a vector of these bit values expressing
36I/O characteristics of the mass storage device that holds the file
37that the sqlite3_io_methods refers to.
38.Pp
39The SQLITE_IOCAP_ATOMIC property means that all writes of any size
40are atomic.
41The SQLITE_IOCAP_ATOMICnnn values mean that writes of blocks that are
42nnn bytes in size and are aligned to an address which is an integer
43multiple of nnn are atomic.
44The SQLITE_IOCAP_SAFE_APPEND value means that when data is appended
45to a file, the data is appended first then the size of the file is
46extended, never the other way around.
47The SQLITE_IOCAP_SEQUENTIAL property means that information is written
48to disk in the same order as calls to xWrite().
49The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that after reboot
50following a crash or power loss, the only bytes in a file that were
51written at the application level might have changed and that adjacent
52bytes, even bytes within the same sector are guaranteed to be unchanged.
53The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN flag indicate that a file cannot
54be deleted when open.
55.Sh SEE ALSO
56.Xr sqlite3_io_methods 3
57