Updated: 2025/Nov/16
Please read Privacy Policy. It's for your privacy.
SQLITE_IOCAP_ATOMIC(3) Library Functions Manual 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
#include <sqlite3.h>
#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.
IMPLEMENTATION NOTES
These declarations were extracted from the interface documentation at
line 622.
#define SQLITE_IOCAP_ATOMIC 0x00000001
#define SQLITE_IOCAP_ATOMIC512 0x00000002
#define SQLITE_IOCAP_ATOMIC1K 0x00000004
#define SQLITE_IOCAP_ATOMIC2K 0x00000008
#define SQLITE_IOCAP_ATOMIC4K 0x00000010
#define SQLITE_IOCAP_ATOMIC8K 0x00000020
#define SQLITE_IOCAP_ATOMIC16K 0x00000040
#define SQLITE_IOCAP_ATOMIC32K 0x00000080
#define SQLITE_IOCAP_ATOMIC64K 0x00000100
#define SQLITE_IOCAP_SAFE_APPEND 0x00000200
#define SQLITE_IOCAP_SEQUENTIAL 0x00000400
#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
SEE ALSO
sqlite3_io_methods(3), SQLITE_FCNTL_LOCKSTATE(3)
NetBSD 11.99 January 24, 2024 NetBSD 11.99