@crvouga/postgres-mem 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ import type { SelectStmt } from "../ast/nodes.js";
2
+ /** Minimal SELECT deparsing for pg_get_viewdef / information_schema. */
3
+ export declare function deparseSelect(stmt: SelectStmt): string;
@@ -214,6 +214,8 @@ export declare class DatabaseState {
214
214
  schema: string;
215
215
  name: string;
216
216
  } | null;
217
+ /** Session currval per sequence; absent entry means currval is undefined. */
218
+ sequenceCurrval: Map<string, bigint>;
217
219
  constructor(prng: Prng, clock: Clock);
218
220
  nextOid(): number;
219
221
  getSetting(name: string): string | undefined;
@@ -42,4 +42,6 @@ export declare function jsonbEquals(a: JsonbValue, b: JsonbValue): boolean;
42
42
  /** Total order over jsonb (matches jsonb btree comparison semantics). */
43
43
  export declare function jsonbCompare(a: JsonbValue, b: JsonbValue): number;
44
44
  /** jsonb containment (@>). */
45
- export declare function jsonbContains(a: JsonbValue, b: JsonbValue): boolean;
45
+ export declare function jsonbContains(a: JsonbValue, b: JsonbValue, opts?: {
46
+ allowScalarInArray?: boolean;
47
+ }): boolean;
@@ -0,0 +1,17 @@
1
+ /** Canonical int4range datum (PG range type). */
2
+ export interface Int4Range {
3
+ readonly kind: "int4range";
4
+ readonly empty: boolean;
5
+ readonly lower: number | null;
6
+ readonly upper: number | null;
7
+ readonly lowerInc: boolean;
8
+ readonly upperInc: boolean;
9
+ }
10
+ export declare function emptyInt4Range(): Int4Range;
11
+ export declare function makeInt4Range(lower: number | null, upper: number | null, lowerInc: boolean, upperInc: boolean): Int4Range;
12
+ /** typinput for int4range: `[1,10)`, `empty`, `(,)` unbounded. */
13
+ export declare function parseInt4RangeText(text: string): Int4Range;
14
+ export declare function int4RangeText(r: Int4Range): string;
15
+ export declare function isInt4Range(v: unknown): v is Int4Range;
16
+ export declare function int4RangeContains(outer: Int4Range, inner: Int4Range | number): boolean;
17
+ export declare function int4RangeOverlaps(a: Int4Range, b: Int4Range): boolean;