import { CookieDB } from "https://deno.land/x/cookie_driver@0.4.0/mod.ts";
Main CookieDB interface
Methods
createUser(options?: { username?: string; token?: string; admin?: boolean; }): Promise<{ username: string; token: string; }>
Creates a user for this database. Requires an administrator token.
insert<T extends Document | Document[]>(table: string, document: T): Promise<T extends Document[] ? string[] : string>
Insert a document into a table and return key
select(): Promise<Document[]>
table: string,
where?: string,
options?: { maxResults?: number; showKeys?: boolean; expandKeys?: boolean; order?: { by: string; descending?: boolean; }; },
Selects a number of documents from a table. Accepts an options argument that specifies the maximum amount of results, whether to display keys, and whether to join documents by foreign keys.