@crvouga/mockingbird-service-postgres 3.5.0 → 3.7.0
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.
- package/CHANGELOG.md +12 -0
- package/COMPATIBILITY.md +34 -0
- package/README.md +5 -0
- package/compat/sections/trg.ts +2 -0
- package/dist/admin.js +1114 -735
- package/dist/admin.js.map +4 -4
- package/dist/api/schema-report.d.ts +32 -0
- package/dist/ast/nodes.d.ts +11 -1
- package/dist/executor/relation.d.ts +1 -0
- package/dist/executor/triggers-scope.d.ts +4 -0
- package/dist/executor/triggers.d.ts +4 -0
- package/dist/expressions/context.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1266 -699
- package/dist/index.js.map +4 -4
- package/dist/server.js +1144 -736
- package/dist/server.js.map +4 -4
- package/dist/storage/database-state.d.ts +20 -0
- package/dist/storage/guc.d.ts +2 -0
- package/dist/storage/indexable-relation.d.ts +3 -0
- package/dist/types/regnamespace.d.ts +5 -0
- package/dist/types/value.d.ts +2 -0
- package/dist/unstable.js +17231 -16852
- package/dist/unstable.js.map +4 -4
- package/dist/wire/cli.js +1330 -749
- package/dist/wire/cli.js.map +4 -4
- package/dist/wire/index.js +1144 -736
- package/dist/wire/index.js.map +4 -4
- package/package.json +1 -1
|
@@ -83,6 +83,9 @@ export interface IndexMeta {
|
|
|
83
83
|
isConstraint: boolean;
|
|
84
84
|
}
|
|
85
85
|
export interface TriggerMeta {
|
|
86
|
+
constraint?: boolean;
|
|
87
|
+
deferrable?: boolean;
|
|
88
|
+
initiallyDeferred?: boolean;
|
|
86
89
|
name: string;
|
|
87
90
|
timing: "before" | "after" | "instead_of";
|
|
88
91
|
events: CreateTriggerStmt["events"];
|
|
@@ -97,6 +100,8 @@ export declare class TableData {
|
|
|
97
100
|
schema: string;
|
|
98
101
|
columns: ColumnMeta[];
|
|
99
102
|
rows: Datum[][];
|
|
103
|
+
rowXmins: WeakMap<Datum[], number>;
|
|
104
|
+
slabXmins: number[] | null;
|
|
100
105
|
/** Frozen columnar storage after snapshot hydrate; `rows` stays empty until materialized. */
|
|
101
106
|
slab: ColumnarSlab | null;
|
|
102
107
|
constraints: ConstraintMeta[];
|
|
@@ -186,6 +191,7 @@ export interface DomainData {
|
|
|
186
191
|
shareCount?: number;
|
|
187
192
|
}
|
|
188
193
|
export interface FunctionData {
|
|
194
|
+
settings?: Record<string, string>;
|
|
189
195
|
name: string;
|
|
190
196
|
schema: string;
|
|
191
197
|
argNames: (string | null)[];
|
|
@@ -259,7 +265,21 @@ export declare class DatabaseState {
|
|
|
259
265
|
clock: Clock;
|
|
260
266
|
changes: number;
|
|
261
267
|
private oidCounter;
|
|
268
|
+
/** Local monotonic xid allocator; 2 denotes a row from a legacy snapshot without metadata. */
|
|
269
|
+
xidCounter: number;
|
|
270
|
+
transactionXid: number | null;
|
|
271
|
+
allocateXid(): number;
|
|
262
272
|
inTransaction: boolean;
|
|
273
|
+
/** Transaction-only events: included in rollback clones, never in exported snapshots. */
|
|
274
|
+
pendingTriggers: Array<{
|
|
275
|
+
schema: string;
|
|
276
|
+
table: string;
|
|
277
|
+
trigger: string;
|
|
278
|
+
event: "insert" | "update" | "delete";
|
|
279
|
+
oldRow: Datum[] | null;
|
|
280
|
+
newRow: Datum[] | null;
|
|
281
|
+
}>;
|
|
282
|
+
constraintModes: Map<string, boolean>;
|
|
263
283
|
/** most recent sequence touched by nextval/setval, for lastval() */
|
|
264
284
|
lastSequence: {
|
|
265
285
|
schema: string;
|
|
@@ -19,5 +19,10 @@ export declare function parseNamespaceInput(text: string): {
|
|
|
19
19
|
} | {
|
|
20
20
|
name: string;
|
|
21
21
|
};
|
|
22
|
+
export declare function parseRelationInput(text: string): {
|
|
23
|
+
oid: number;
|
|
24
|
+
} | {
|
|
25
|
+
parts: string[];
|
|
26
|
+
};
|
|
22
27
|
/** regnamespaceout: `-` for zero, the quoted schema name, or the bare number when no schema has that oid. */
|
|
23
28
|
export declare function namespaceText(oid: number, name: string | null | undefined): string;
|
package/dist/types/value.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export declare function moneyText(cents: bigint): string;
|
|
|
82
82
|
export interface OutputCtx {
|
|
83
83
|
/** unquoted schema name for an oid, or null when no schema has it */
|
|
84
84
|
namespaceName?(oid: number): string | null;
|
|
85
|
+
relationName?(oid: number): string | null;
|
|
85
86
|
/** offset seconds east of UTC for rendering timestamptz at given UTC micros */
|
|
86
87
|
zoneOffsetAt(utcMicros: bigint): number;
|
|
87
88
|
}
|
|
@@ -93,6 +94,7 @@ export declare function datumText(t: TypeId, v: Datum, ctx: OutputCtx): string;
|
|
|
93
94
|
export interface InputCtx {
|
|
94
95
|
/** oid of the schema with exactly this name; raises 3F000 when there is none */
|
|
95
96
|
namespaceOid?(name: string): number;
|
|
97
|
+
relationOid?(parts: string[]): number;
|
|
96
98
|
/** session zone offset lookup for naive timestamptz input */
|
|
97
99
|
zoneOffsetForNaive(naiveMicros: bigint): number;
|
|
98
100
|
/** enum label validation: returns true when label is valid for the enum type */
|