Skip to main content

Module options

Module options 

Source

Enums§

KeyEncoding
OptionsError
Rejection of an open() options document, before the engine is ever touched.

Functions§

decode_base64
Standard and URL-safe base64, padding optional. None on any symbol outside the alphabet or a length that cannot be a whole number of bytes.
decode_hex
Lowercase or uppercase hex, no separators. None on an odd length or a non-hex digit.
parse_backup_options
Builds BackupOptions from the JSON document backup() takes: { indexes?: boolean, excludeTables?: string[], lock? }.
parse_cypher
The cypher sub-document of the open() options document, on its own — { keys, keyId, keyEncoding, onMissingKey }. Public because a host that reads key material from a file or an environment variable (crate::keys) has such a document and no options document around it.
parse_migrate_layout_options
Builds LayoutMigrationOptions from the JSON document migrateLayout() takes — the TS LayoutMigrationOptions, member for member, plus the lock of open() so a host that has to wait differently for the writer lock can say so. Every member is optional; {} and null both mean “move it into the nested arrangement, keeping the document’s name”.
parse_open_options
Builds OpenOptions from the JSON document open() takes. Every member is optional; an absent one keeps the engine’s own default, so {} and null both mean “open it the usual way”.
parse_pack_limits_options
Builds PackLimits from { limits?: { maxArchiveBytes?, maxTotalBytes?, maxEntryBytes?, maxEntries? } }.
parse_pack_options
Builds PackOptions from the JSON document pack() takes: { indexes?: boolean, excludeTables?: string[], extra?: { [entryName]: string }, limits?, lock? }.
parse_restore_options
Builds RestoreOptions from the JSON document restore() takes: { maxImageBytes?, lock? }.
parse_unpack_options
Builds UnpackOptions from the JSON document unpack() takes: { limits?, maxImageBytes?, lock? }.
parse_verify_options
Builds VerifyOptions from the JSON document verify() takes: { relations?: boolean, images?: boolean, maxImageBytes?: number }. null and {} mean the defaults.