Module

x/pg_mem/index.ts>MemoryDbOptions

An in memory postgres DB instance for your unit tests
Latest
interface MemoryDbOptions
import { type MemoryDbOptions } from "https://dotland.deno.dev/x/pg_mem@3.0.3/index.ts";

Properties

optional
noErrorDiagnostic: boolean

If set to true, pg-mem will stop embbeding info about the SQL statement that has failed in exception messages.

optional
noAstCoverageCheck: boolean

If set to true, then the query runner will not check that no AST part has been left behind when parsing the request.

... so setting it to true could lead to unnoticed ignored query parts.

(advice: only set it to true as a workaround while an issue on https://github.com/oguimbal/pg-mem is being fixed... )

optional
noIgnoreUnsupportedIndices: boolean

If set to true, this will throw an exception if you try to use an unsupported index type (only BTREE is supported at time of writing)

readonly
optional
autoCreateForeignKeyIndices: boolean

When set to true, this will auto create an index on foreign table when adding a foreign key. 👉 Recommanded when using Typeorm .synchronize(), which creates foreign keys but not indices !