Module

x/pg_mem/schema/btree-index.ts>BIndex

An in memory postgres DB instance for your unit tests
Go to Latest
class BIndex
implements _INamedIndex<T>
import { BIndex } from "https://dotland.deno.dev/x/pg_mem@2.6.7/schema/btree-index.ts";

Constructors

new
BIndex(
name: string,
onTable: _ITable<T>,
hash: string,
unique: boolean,
notNull: boolean,
predicate: IValue | nil,
)

Type Parameters

optional
T = any

Properties

private
treeBinId: symbol
private
treeCountId: symbol
expressions: (IndexExpression & IValue)[]
readonly
ownerSchema: _ISchema
readonly
reg: Reg
readonly
type: "index"

Methods

private
_enumerate(op: IndexOp): Iterable<T>
private
_keyCount(op: IndexOp)
private
bin(t: _Transaction)
private
getCount(t: _Transaction): number
private
setBin(t: _Transaction, val: RawTree<T>)
private
setCount(t: _Transaction, val: number)
add(raw: T, t: _Transaction)
buildKey(raw: any, t: _Transaction): any[]
compare(_a: any, _b: any)
delete(raw: any, t: _Transaction)
drop(t: _Transaction): void
enumerate(op: IndexOp): Iterable<T>
eq(
key: IndexKey,
matchNull: boolean,
): Iterable<T>
eqFirst(rawKey: IndexKey, t: _Transaction): T | null
ge(key: IndexKey, t: _Transaction): Iterable<T>
gt(key: IndexKey, t: _Transaction): Iterable<T>
hasKey(key: IndexKey[], t: _Transaction): boolean
inside(): Iterable<T>
le(key: IndexKey, t: _Transaction): Iterable<T>
lt(key: IndexKey, t: _Transaction): Iterable<T>
neq(
key: IndexKey,
matchNull: boolean,
): Iterable<T>
nin(rawKey: IndexKey[], t: _Transaction): Iterable<T>
outside(): Iterable<T>