import { default } from "https://deno.land/x/aloedb@0.1.0/lib/database.ts";
AloeDB 🌿
Light, Embeddable, NoSQL database for Deno
Constructors
new
default(config: Partial<DatabaseConfig>)new
default(config?: Partial<DatabaseConfig> | string)Type Parameters
optional
Schema extends Acceptable<Schema> = DocumentProperties
documents: Schema[]
In-Memory documents storage.
WARNING: It is better not to modify these documents manually, as the changes will not pass the necessary checks.
However, if you modify storage manualy ( bypassing compiler checks ), call the method db.save()
to save your changes.
Methods
save(): Promise<void>
Write documents to the database file. Called automatically after each insert, update or delete operation.
updateMany(query: Query<Schema> | QueryFunction<Schema>, update: Update<Schema> | UpdateFunction<Schema>): Promise<Schema[]>
Modifies all documents that match search query.
updateOne(query: Query<Schema> | QueryFunction<Schema>, update: Update<Schema> | UpdateFunction<Schema>): Promise<Schema | null>
Modifies an existing document.