Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

An in memory postgres DB instance for your unit tests
Latest
class BIndex
implements _INamedIndex
import { BIndex } from "https://deno.land/x/pg_mem@3.0.3/schema/btree-index.ts";

Constructors

new
BIndex(
name: string,
cols: readonly CreateIndexColDef[],
onTable: _ITable,
hash: string,
unique: boolean,
notNull: boolean,
predicate: IValue | nil,
)

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<Row>
private
_keyCount(op: IndexOp)
private
bin(t: _Transaction)
private
getCount(t: _Transaction): number
private
setBin(t: _Transaction, val: RawTree)
private
setCount(t: _Transaction, val: number)
add(raw: Row, 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<Row>
eq(
key: IndexKey,
matchNull: boolean,
): Iterable<Row>
eqFirst(rawKey: IndexKey, t: _Transaction): Row | null
ge(key: IndexKey, t: _Transaction): Iterable<Row>
gt(key: IndexKey, t: _Transaction): Iterable<Row>
hasKey(key: IndexKey[], t: _Transaction): boolean
inside(): Iterable<Row>
le(key: IndexKey, t: _Transaction): Iterable<Row>
lt(key: IndexKey, t: _Transaction): Iterable<Row>
neq(
key: IndexKey,
matchNull: boolean,
): Iterable<Row>
nin(rawKey: IndexKey[], t: _Transaction): Iterable<Row>
outside(): Iterable<Row>