Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/aloedb/lib/types.ts>DatabaseConfig

Light, Embeddable, NoSQL database for Deno 🦕
Latest
interface DatabaseConfig
import { type DatabaseConfig } from "https://deno.land/x/aloedb@0.9.0/lib/types.ts";

Database initialization config

Properties

optional
path: string

Path to the database file. If undefined, data will be stored only in-memory. (Default: undefined)

pretty: boolean

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

autoload: boolean

Automatically load the file synchronously when initializing the database. (Default: true)

autosave: boolean

Automatically save data to the file after inserting, updating and deleting documents. If path specified, data will be read from the file, but new data will not be written.

immutable: boolean

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

optimize: boolean

Optimize data writing. If enabled, the data will be written many times faster in case of a large number of operations. Disable it if you want the methods to be considered executed only when the data is written to a file. (Default: true)

optional
validator: Validator

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