Module

x/pg_mem/interfaces-private.ts>IValue

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

Type Parameters

optional
TRaw = any

Properties

readonly
usedColumns: ReadonlySet<IValue>

Columns used in this expression (if any)

readonly
type: _IType<TRaw>
readonly
isAny: boolean

is 'any()' call ?

readonly
isConstant: boolean

Is a constant... i.e. not dependent on columns. ex: (2+2) or NOW()

readonly
isConstantReal: boolean

Is REAL constant (i.e. 2+2, not varying expressions like NOW())

readonly
isConstantLiteral: boolean

Is a literal constant ? (constant not defined as an operation)

readonly
index: _IIndex | nil

Will be set if there is an index on this value

readonly
origin: _ISelection | nil

Originates from this selection

readonly
id: string | nil

Column ID, or null

readonly
hash: string

Hash of this value (used to identify indexed expressions)

Methods

get(): any

Get value if is a constant

get(raw: TRaw, t?: _Transaction | nil): any

Get value if is NOT a constant

setId(newId: string): IValue
canCast(to: _IType): boolean
cast<T = any>(to: _IType<T>): IValue<T>
convertImplicit<T = any>(to: _IType<T>): IValue<T>
setWrapper<TNew>(
newOrigin: _ISelection,
unwrap: (val: TRaw) => TNew,
newType: _IType<TNew>,
): IValue<TNew>

Creates a copy of this column that can

setWrapper(newOrigin: _ISelection, unwrap: (val: TRaw) => TRaw): IValue<TRaw>
map(unwrap: (val: TRaw) => TRaw): IValue<TRaw>
map<TNew>(unwrap: (val: TRaw) => TNew, newType: _IType<TNew>): IValue<TNew>
setOrigin(origin: _ISelection): IValue<TRaw>
clone(): IValue<any>