UNPKG

pg-mem

Version:

A memory version of postgres

45 lines 2.1 kB
import { _ISelection, _IIndex, IValue, _IType, _Transaction, _Explainer, _SelectExplanation, IndexKey, _IndexExplanation, IndexExpression, IndexOp, Stats, _IAggregation, Row } from '../interfaces-private'; import { nil } from '../interfaces'; import { Evaluator, EvaluatorOptions } from '../evaluator'; import { TransformBase } from './transform-base'; import { SelectedColumn, Expr, ExprRef } from 'pgsql-ast-parser'; export declare function buildSelection(on: _ISelection, select: SelectedColumn[] | nil): _ISelection | Selection; export declare function columnEvaluator(this: void, on: _ISelection, id: string, type: _IType, opts?: EvaluatorOptions): Evaluator<any>; export interface CustomAlias { val: IValue; as?: string; expr?: Expr; } export declare class Selection extends TransformBase implements _ISelection { private columnIds; private columnsOrigin; private columnMapping; private indexCache; private columnsById; private symbol; readonly columns: IValue[]; isAggregation(): this is _IAggregation; constructor(base: _ISelection, _columns: (SelectedColumn | CustomAlias)[]); private refColumn; stats(t: _Transaction): Stats | null; enumerate(t: _Transaction): Iterable<Row>; build(item: any, t: _Transaction): Row; hasItem(value: Row, t: _Transaction): boolean; getColumn(column: string | ExprRef): IValue; getColumn(column: string | ExprRef, nullIfNotFound?: boolean): IValue | nil; getIndex(val: IValue): _IIndex | nil; explain(e: _Explainer): _SelectExplanation; } export declare class SelectionIndex implements _IIndex { readonly owner: Selection; private base; constructor(owner: Selection, base: _IIndex); stats(t: _Transaction, key?: IndexKey): Stats | null; iterateKeys(t: _Transaction): Iterable<IndexKey> | null; get expressions(): IndexExpression[]; entropy(op: IndexOp): number; eqFirst(rawKey: IndexKey, t: _Transaction): any; enumerate(op: IndexOp): Iterable<Row>; explain(e: _Explainer): _IndexExplanation; } //# sourceMappingURL=selection.d.ts.map