Module

x/pg_mem/evaluator.ts>Evaluator

An in memory postgres DB instance for your unit tests
Latest
class Evaluator
implements IValue<T>
import { Evaluator } from "https://dotland.deno.dev/x/pg_mem@3.0.3/evaluator.ts";

Constructors

new
Evaluator(
type: _IType<T>,
id: string | nil,
hash: string,
dependencies: IValue | IValue[] | nil,
val:
| nil
| Object
| number
| string
| Date
| ((raw: any, transaction: _Transaction | nil) => any)
,
)

Type Parameters

optional
T = any

Properties

readonly
optional
forceNotConstant: boolean
readonly
index: _IIndex | nil
readonly
isAny: boolean
readonly
isConstant: boolean
readonly
isConstantLiteral: boolean
readonly
isConstantReal: boolean
origin: _ISelection | nil
readonly
usedColumns: Set<IValue>

Methods

canCast(to: _IType<T>): boolean
cast<T = any>(to: _IType<T>): IValue
convertImplicit<T = any>(to: _IType<T>): IValue
get(): T
get(raw: any, t: _Transaction | nil): T
map<TNew>(mapper: (val: T) => TNew, newType?: _IType<TNew>): IValue<TNew>
setConversion(converter: (val: T, t: _Transaction | nil) => any, hashConv: (hash: string) => any)
setId(newId: string): IValue
setWrapper<TNew>(
newOrigin: _ISelection,
unwrap: (val: T) => TNew,
newType?: _IType<TNew>,
): IValue<TNew>