Module

x/pg_mem/interfaces.ts>IMemoryTable

An in memory postgres DB instance for your unit tests
Go to Latest
interface IMemoryTable
import { type IMemoryTable } from "https://dotland.deno.dev/x/pg_mem@2.6.3/interfaces.ts";

Type Parameters

optional
T = any

Methods

on(event: TableEvent, handler: () => any): ISubscription

Subscribe to an event on this table

listIndices(): IndexDef[]

List existing indices defined on this table

insert(item: Partial<T>): T

Inserts a raw item into this table. ⚠ Neither the record you provided, nor the returned value are the actual item stored. You wont be able to mutate internal state.

find(template?: Partial<T> | nil, columns?: (keyof T)[]): Iterable<T>

Find all items matching a specific template