1.Dd January 24, 2024 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.In sqlite3.h 23.Fd #define SQLITE_IOCAP_ATOMIC 24.Fd #define SQLITE_IOCAP_ATOMIC512 25.Fd #define SQLITE_IOCAP_ATOMIC1K 26.Fd #define SQLITE_IOCAP_ATOMIC2K 27.Fd #define SQLITE_IOCAP_ATOMIC4K 28.Fd #define SQLITE_IOCAP_ATOMIC8K 29.Fd #define SQLITE_IOCAP_ATOMIC16K 30.Fd #define SQLITE_IOCAP_ATOMIC32K 31.Fd #define SQLITE_IOCAP_ATOMIC64K 32.Fd #define SQLITE_IOCAP_SAFE_APPEND 33.Fd #define SQLITE_IOCAP_SEQUENTIAL 34.Fd #define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 35.Fd #define SQLITE_IOCAP_POWERSAFE_OVERWRITE 36.Fd #define SQLITE_IOCAP_IMMUTABLE 37.Fd #define SQLITE_IOCAP_BATCH_ATOMIC 38.Sh DESCRIPTION 39The xDeviceCharacteristics method of the sqlite3_io_methods 40object returns an integer which is a vector of these bit values expressing 41I/O characteristics of the mass storage device that holds the file 42that the sqlite3_io_methods refers to. 43.Pp 44The SQLITE_IOCAP_ATOMIC property means that all writes of any size 45are atomic. 46The SQLITE_IOCAP_ATOMICnnn values mean that writes of blocks that are 47nnn bytes in size and are aligned to an address which is an integer 48multiple of nnn are atomic. 49The SQLITE_IOCAP_SAFE_APPEND value means that when data is appended 50to a file, the data is appended first then the size of the file is 51extended, never the other way around. 52The SQLITE_IOCAP_SEQUENTIAL property means that information is written 53to disk in the same order as calls to xWrite(). 54The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that after reboot 55following a crash or power loss, the only bytes in a file that were 56written at the application level might have changed and that adjacent 57bytes, even bytes within the same sector are guaranteed to be unchanged. 58The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN flag indicates that a file cannot 59be deleted when open. 60The SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on read-only 61media and cannot be changed even by processes with elevated privileges. 62.Pp 63The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying filesystem 64supports doing multiple write operations atomically when those write 65operations are bracketed by SQLITE_FCNTL_BEGIN_ATOMIC_WRITE 66and SQLITE_FCNTL_COMMIT_ATOMIC_WRITE. 67.Sh IMPLEMENTATION NOTES 68These declarations were extracted from the 69interface documentation at line 622. 70.Bd -literal 71#define SQLITE_IOCAP_ATOMIC 0x00000001 72#define SQLITE_IOCAP_ATOMIC512 0x00000002 73#define SQLITE_IOCAP_ATOMIC1K 0x00000004 74#define SQLITE_IOCAP_ATOMIC2K 0x00000008 75#define SQLITE_IOCAP_ATOMIC4K 0x00000010 76#define SQLITE_IOCAP_ATOMIC8K 0x00000020 77#define SQLITE_IOCAP_ATOMIC16K 0x00000040 78#define SQLITE_IOCAP_ATOMIC32K 0x00000080 79#define SQLITE_IOCAP_ATOMIC64K 0x00000100 80#define SQLITE_IOCAP_SAFE_APPEND 0x00000200 81#define SQLITE_IOCAP_SEQUENTIAL 0x00000400 82#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800 83#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000 84#define SQLITE_IOCAP_IMMUTABLE 0x00002000 85#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000 86.Ed 87.Sh SEE ALSO 88.Xr sqlite3_io_methods 3 , 89.Xr SQLITE_FCNTL_LOCKSTATE 3 90