import { type ISchema } from "https://dotland.deno.dev/x/pg_mem@3.0.3/interfaces-private.ts";
Methods
declareTable(table: Schema): IMemoryTable<any>
Another way to create tables (equivalent to "create table" queries")
query(text: QueryOrAst): QueryResult
Execute a query that has no argument, and returns the latest query result (shortcut for .prepare(cmd).bind().executeAll())
queries(text: QueryOrAst): Iterable<QueryResult>
Progressively executes a query that has no argument, yielding results until the end of enumeration (or an exception) (shortcut for .prepare(cmd).bind().iterate())
getTable(table: string, nullIfNotFound?: boolean): IMemoryTable<unknown> | null
registerEquivalentType(type: IEquivalentType): IType
Register a simple type, which is equivalent to another
registerEquivalentSizableType(type: IEquivalentType): IType
Register a simple type, which is equivalent to another
migrate(config?: MigrationParams): Promise<void>
Database migration, node-sqlite flavor ⚠ Only working when runnin nodejs !
interceptQueries(interceptor: QueryInterceptor): ISubscription
Intecept queries. If your interceptor returns an array, then the query will not be executed. The given result will be returned instead.