Skip to main content
Module

x/aloedb/mod.ts>Types.DatabaseConfig

Light, Embeddable, NoSQL database for Deno 🦕
Go to Latest
interface Types.DatabaseConfig
import { type Types } from "https://deno.land/x/aloedb@0.1.0/mod.ts";
const { DatabaseConfig } = Types;

Database initialization config

Properties

optional
path: string

Path to the database file.

pretty: boolean

Save data in easy-to-read format. ( Default: true )

immutable: boolean

Automatically deeply clone all returned objects. ( Default: true )

safeWrite: boolean

Write data to the file without risk of loss. Instead of simply writing data to a file, the data will be written to a temporary file, which will then be renamed the main file. ( Default: true )

onlyInMemory: boolean

Do not write data to the database file. If "path" specified, data will be read from the file, but new data will not be written.

optional
schemaValidator: SchemaValidator

Manual document validation function. If the document does not pass the validation, just throw the error. Works well with Superstruct!