SQLITE_IOCAP_ATOMIC(3)

NAME
SQLITE_IOCAP_ATOMIC, SQLITE_IOCAP_ATOMIC512, SQLITE_IOCAP_ATOMIC1K, SQLITE_IOCAP_ATOMIC2K, SQLITE_IOCAP_ATOMIC4K, SQLITE_IOCAP_ATOMIC8K, SQLITE_IOCAP_ATOMIC16K, SQLITE_IOCAP_ATOMIC32K, SQLITE_IOCAP_ATOMIC64K, SQLITE_IOCAP_SAFE_APPEND, SQLITE_IOCAP_SEQUENTIAL, SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN, SQLITE_IOCAP_POWERSAFE_OVERWRITE, SQLITE_IOCAP_IMMUTABLE, SQLITE_IOCAP_BATCH_ATOMIC - Device Characteristics

SYNOPSIS
#define SQLITE_IOCAP_ATOMIC
#define SQLITE_IOCAP_ATOMIC512
#define SQLITE_IOCAP_ATOMIC1K
#define SQLITE_IOCAP_ATOMIC2K
#define SQLITE_IOCAP_ATOMIC4K
#define SQLITE_IOCAP_ATOMIC8K
#define SQLITE_IOCAP_ATOMIC16K
#define SQLITE_IOCAP_ATOMIC32K
#define SQLITE_IOCAP_ATOMIC64K
#define SQLITE_IOCAP_SAFE_APPEND
#define SQLITE_IOCAP_SEQUENTIAL
#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE
#define SQLITE_IOCAP_IMMUTABLE
#define SQLITE_IOCAP_BATCH_ATOMIC

DESCRIPTION
The xDeviceCharacteristics method of the sqlite3_io_methods object returns an integer which is a vector of these bit values expressing I/O characteristics of the mass storage device that holds the file that the sqlite3_io_methods refers to.

The SQLITE_IOCAP_ATOMIC property means that all writes of any size are atomic. The SQLITE_IOCAP_ATOMICnnn values mean that writes of blocks that are nnn bytes in size and are aligned to an address which is an integer multiple of nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means that when data is appended to a file, the data is appended first then the size of the file is extended, never the other way around. The SQLITE_IOCAP_SEQUENTIAL property means that information is written to disk in the same order as calls to xWrite(). The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that after reboot following a crash or power loss, the only bytes in a file that were written at the application level might have changed and that adjacent bytes, even bytes within the same sector are guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN flag indicates that a file cannot be deleted when open. The SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on read-only media and cannot be changed even by processes with elevated privileges.

The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying filesystem supports doing multiple write operations atomically when those write operations are bracketed by SQLITE_FCNTL_BEGIN_ATOMIC_WRITE and SQLITE_FCNTL_COMMIT_ATOMIC_WRITE.

SEE ALSO
sqlite3_io_methods(3), SQLITE_FCNTL_LOCKSTATE(3)