deno.land / x / pg_mem@2.8.1 / transforms / array-filter.ts

array-filter.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { FilterBase } from './transform-base.ts';import { _ISelection, _Explainer, _SelectExplanation, _Transaction, Stats } from '../interfaces-private.ts';
export class ArrayFilter<T = any> extends FilterBase<T> {
get index() { return null; }
entropy() { return this.rows.length; }
hasItem(raw: T): boolean { return this.rows.includes(raw); }
getIndex() { return null; }
constructor(fromTable: _ISelection<T>, public rows: T[]) { super(fromTable); }
enumerate(): Iterable<T> { return this.rows; }
stats(t: _Transaction): Stats | null { return { count: this.rows.length, }; }
explain(e: _Explainer): _SelectExplanation { return { id: e.idFor(this), _: 'constantSet', rawArrayLen: this.rows.length, } }}
pg_mem

Version Info

Tagged at
4 months ago