Skip to main content
Module

x/cookie_driver/mod.ts>CookieDB

A fast and correct cookiedb driver for deno
Go to Latest
class CookieDB
import { CookieDB } from "https://deno.land/x/cookie_driver@0.1.0/mod.ts";

Main CookieDB interface

Constructors

new
CookieDB(url: string, auth: string)

Properties

auth: string
url: string

Methods

createTable(table: string, schema?: Schema)

Create a table by name and with an optional schema

delete(table: string, key: string)

Delete a document from table by key.

dropTable(table: string)

Drops a table by name

get(
table: string,
key: string,
expandKeys?: boolean,
)

Get a document from table by key. Optionally can join documents by foreign keys

insert(table: string, document: any)

Insert a document into a table and return key

select(
table: string,
query: Query | Query[],
options?: { maxResults?: number; showKeys?: boolean; expandKeys?: boolean; },
): Promise<any[]>

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.

update(
table: string,
key: string,
document: any,
)

Update a document from table by key.