default
import { default } from "https://pk2kfdkzhspesdc7wayhxkmyv4eoyh7wkpzlhylcq3fga5gelt7q.arweave.net/erSijVk8nkkMX7Awe6mYrwjsH_ZT8rPhYobKYHTEXP8/mod.ts";class default<T extends Model = Model> { }
constructor(name: string, baseUrl: string);
private data: T[];
private fsPath: string;
delete(id?: string);
find(options: T);
get();
getById(id: string);
insert(el: T);
save();
update(id: string, el: T);
class default { }
constructor(fsPath?: string);
private fsPath: string;
save();
§Constructors
§Properties
§Methods
§
delete(id?: string)
[src]Delete a document when an ID is provided. Otherwise delete the whole collection
@param id
Optional: the document ID to be deleted
@return
an object indicates success
§
find(options: T)
[src]Find some documents by using filter conditions
Caution! The method on this stage is only able to find documents with equals properties. For more options like greater than, less than or equal to, please wait for newer version
@param options
filter conditions