Whether an error means the database file is damaged, rather than busy, full or misused.
Whatever a sqlite call threw.
True for SQLITE_CORRUPT, SQLITE_NOTADB and their messages.
SQLITE_CORRUPT
SQLITE_NOTADB
import { isCorruptionError } from '@kernlize/core/cache';isCorruptionError(new Error('SQLITE_CORRUPT: database disk image is malformed')); // trueisCorruptionError(new Error('SQLITE_BUSY: database is locked')); // false Copy
import { isCorruptionError } from '@kernlize/core/cache';isCorruptionError(new Error('SQLITE_CORRUPT: database disk image is malformed')); // trueisCorruptionError(new Error('SQLITE_BUSY: database is locked')); // false
Whether an error means the database file is damaged, rather than busy, full or misused.