Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

FileDB

import { FileDB } from "https://pk2kfdkzhspesdc7wayhxkmyv4eoyh7wkpzlhylcq3fga5gelt7q.arweave.net/erSijVk8nkkMX7Awe6mYrwjsH_ZT8rPhYobKYHTEXP8/mod.ts";
class FileDB {
constructor(fsPath?: string);
private collections: Record<string, Collection>;
private fsPath: string;
 
get<T extends Model>(colName: string): Collection<T>;
save();
}

§Constructors

§
new FileDB(fsPath?: string)
[src]

Ensure the data folder is existed.

@param fsPath

Optional: the base url of the data folder, default "./db"

§Properties

§
collections: Record<string, Collection>
[src]
§
fsPath: string
[src]

§Methods

§
get<T extends Model>(colName: string): Collection<T>
[src]

Get a collection

@param colName

Collection Name

@template T

a type extending Collection Model

@return

the specified collection

§
save()
[src]

Save all data of all collections