@crvouga/postgres-mem 0.1.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/AGENTS.md +159 -0
- package/COMPATIBILITY-AUDIT.md +155 -0
- package/COMPATIBILITY.md +87 -0
- package/LICENSE +21 -0
- package/README.md +325 -0
- package/compat/coverage.json +1081 -0
- package/compat/divergences.json +191 -0
- package/compat/gate-report.json +80 -0
- package/compat/requirements.json +1105 -0
- package/compat/requirements.raw.html +484 -0
- package/compat/scenario-types.ts +98 -0
- package/compat/scenarios.ts +98 -0
- package/compat/sections/agg.ts +45 -0
- package/compat/sections/api.ts +28 -0
- package/compat/sections/arr.ts +45 -0
- package/compat/sections/cat.ts +47 -0
- package/compat/sections/con.ts +32 -0
- package/compat/sections/cpy.ts +24 -0
- package/compat/sections/cte.ts +29 -0
- package/compat/sections/dat.ts +60 -0
- package/compat/sections/ddl.ts +55 -0
- package/compat/sections/det.ts +20 -0
- package/compat/sections/dml.ts +37 -0
- package/compat/sections/eco.ts +16 -0
- package/compat/sections/err.ts +16 -0
- package/compat/sections/exp.ts +53 -0
- package/compat/sections/fun.ts +58 -0
- package/compat/sections/fzz.ts +36 -0
- package/compat/sections/guc.ts +27 -0
- package/compat/sections/joi.ts +33 -0
- package/compat/sections/jsn.ts +46 -0
- package/compat/sections/lim.ts +13 -0
- package/compat/sections/par.ts +61 -0
- package/compat/sections/pre.ts +26 -0
- package/compat/sections/sch.ts +31 -0
- package/compat/sections/sel.ts +43 -0
- package/compat/sections/seq.ts +31 -0
- package/compat/sections/snp.ts +21 -0
- package/compat/sections/tok.ts +53 -0
- package/compat/sections/trg.ts +57 -0
- package/compat/sections/tsr.ts +37 -0
- package/compat/sections/txn.ts +39 -0
- package/compat/sections/typ.ts +55 -0
- package/compat/sections/uni.ts +13 -0
- package/compat/sections/win.ts +43 -0
- package/compat/smoke-baseline.json +3 -0
- package/compat/unsupported-register.json +2526 -0
- package/dist/api/bind.d.ts +10 -0
- package/dist/api/database.d.ts +69 -0
- package/dist/api/statement.d.ts +51 -0
- package/dist/ast/nodes.d.ts +810 -0
- package/dist/constraints/enforce.d.ts +39 -0
- package/dist/errors/error.d.ts +24 -0
- package/dist/executor/ddl.d.ts +23 -0
- package/dist/executor/dml.d.ts +10 -0
- package/dist/executor/execute.d.ts +11 -0
- package/dist/executor/relation.d.ts +60 -0
- package/dist/executor/select.d.ts +41 -0
- package/dist/executor/session.d.ts +21 -0
- package/dist/executor/triggers-exec.d.ts +1 -0
- package/dist/executor/triggers.d.ts +16 -0
- package/dist/executor/window.d.ts +13 -0
- package/dist/expressions/context.d.ts +23 -0
- package/dist/expressions/eval.d.ts +38 -0
- package/dist/expressions/operators.d.ts +8 -0
- package/dist/expressions/pattern.d.ts +20 -0
- package/dist/functions/aggregates.d.ts +17 -0
- package/dist/functions/array-fns.d.ts +2 -0
- package/dist/functions/datetime-fns.d.ts +26 -0
- package/dist/functions/datetime-registry.d.ts +2 -0
- package/dist/functions/json-fns.d.ts +7 -0
- package/dist/functions/math-fns.d.ts +2 -0
- package/dist/functions/misc-fns.d.ts +8 -0
- package/dist/functions/scalar.d.ts +10 -0
- package/dist/functions/srf.d.ts +12 -0
- package/dist/functions/string-fns.d.ts +4 -0
- package/dist/functions/tsearch-fns.d.ts +2 -0
- package/dist/functions/util.d.ts +14 -0
- package/dist/functions/window.d.ts +7 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +19591 -0
- package/dist/index.js.map +7 -0
- package/dist/lexer/tokenize.d.ts +8 -0
- package/dist/parser/index.d.ts +1 -0
- package/dist/parser/parser.d.ts +96 -0
- package/dist/runtime/clock.d.ts +14 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/options.d.ts +25 -0
- package/dist/runtime/prng.d.ts +48 -0
- package/dist/schema/catalog-tables.d.ts +1 -0
- package/dist/schema/catalog.d.ts +12 -0
- package/dist/serialization/codec.d.ts +29 -0
- package/dist/serialization/index.d.ts +1 -0
- package/dist/storage/database-state.d.ts +216 -0
- package/dist/transactions/manager.d.ts +25 -0
- package/dist/tsearch/stem.d.ts +5 -0
- package/dist/tsearch/tsearch.d.ts +59 -0
- package/dist/types/cast.d.ts +26 -0
- package/dist/types/compare.d.ts +18 -0
- package/dist/types/datetime.d.ts +68 -0
- package/dist/types/jsonb.d.ts +45 -0
- package/dist/types/numeric.d.ts +69 -0
- package/dist/types/resolve.d.ts +15 -0
- package/dist/types/timezone.d.ts +9 -0
- package/dist/types/value.d.ts +99 -0
- package/dist/unstable.d.ts +15 -0
- package/dist/unstable.js +19153 -0
- package/dist/unstable.js.map +7 -0
- package/package.json +120 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/** Construct-level drop-in parity catalog types (PostgreSQL dialect). */
|
|
2
|
+
|
|
3
|
+
export const SECTION_CODES = [
|
|
4
|
+
"TOK",
|
|
5
|
+
"PAR",
|
|
6
|
+
"TYP",
|
|
7
|
+
"EXP",
|
|
8
|
+
"FUN",
|
|
9
|
+
"DAT",
|
|
10
|
+
"JSN",
|
|
11
|
+
"ARR",
|
|
12
|
+
"AGG",
|
|
13
|
+
"WIN",
|
|
14
|
+
"SEL",
|
|
15
|
+
"JOI",
|
|
16
|
+
"CTE",
|
|
17
|
+
"DDL",
|
|
18
|
+
"DML",
|
|
19
|
+
"CON",
|
|
20
|
+
"SEQ",
|
|
21
|
+
"TRG",
|
|
22
|
+
"TXN",
|
|
23
|
+
"GUC",
|
|
24
|
+
"SCH",
|
|
25
|
+
"CAT",
|
|
26
|
+
"TSR",
|
|
27
|
+
"CPY",
|
|
28
|
+
"PRE",
|
|
29
|
+
"API",
|
|
30
|
+
"SNP",
|
|
31
|
+
"DET",
|
|
32
|
+
"ERR",
|
|
33
|
+
"UNI",
|
|
34
|
+
"LIM",
|
|
35
|
+
"FZZ",
|
|
36
|
+
"ECO",
|
|
37
|
+
] as const;
|
|
38
|
+
|
|
39
|
+
export type SectionCode = (typeof SECTION_CODES)[number];
|
|
40
|
+
|
|
41
|
+
export type ScenarioKind = "differential" | "documented_divergence" | "fuzz" | "property" | "ecosystem";
|
|
42
|
+
|
|
43
|
+
export type ProofStrength = "proves" | "smoke";
|
|
44
|
+
|
|
45
|
+
export interface Scenario {
|
|
46
|
+
id: string;
|
|
47
|
+
title: string;
|
|
48
|
+
kind: ScenarioKind;
|
|
49
|
+
evidence: string[];
|
|
50
|
+
notes?: string;
|
|
51
|
+
divergenceId?: string;
|
|
52
|
+
strength?: ProofStrength;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface CatalogSection {
|
|
56
|
+
code: SectionCode;
|
|
57
|
+
title: string;
|
|
58
|
+
promoted: boolean;
|
|
59
|
+
scenarios: Scenario[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** IDs look like `TOK-01`, `WIN-frame-04`, `DET-seed-01`. */
|
|
63
|
+
export const SCENARIO_ID_RE = /^([A-Z]{3})(?:-[a-z0-9]+)*-\d{2,}$/;
|
|
64
|
+
|
|
65
|
+
export function catalogTestFile(code: SectionCode): string {
|
|
66
|
+
return `tests/contract/catalog/${code.toLowerCase()}.test.ts`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type ScenarioRow = [
|
|
70
|
+
suffix: string,
|
|
71
|
+
title: string,
|
|
72
|
+
kind?: ScenarioKind,
|
|
73
|
+
notes?: string,
|
|
74
|
+
extraEvidence?: string[],
|
|
75
|
+
divergenceId?: string,
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
/** Build a catalog section from compact rows; IDs become `CODE-suffix`. */
|
|
79
|
+
export function section(code: SectionCode, title: string, promoted: boolean, items: ScenarioRow[]): CatalogSection {
|
|
80
|
+
return {
|
|
81
|
+
code,
|
|
82
|
+
title,
|
|
83
|
+
promoted,
|
|
84
|
+
scenarios: items.map(([suffix, rowTitle, kind = "differential", notes, extra, divergenceId]) => {
|
|
85
|
+
const id = `${code}-${suffix}`;
|
|
86
|
+
if (!SCENARIO_ID_RE.test(id)) throw new Error(`bad scenario id: ${id}`);
|
|
87
|
+
const scenario: Scenario = {
|
|
88
|
+
id,
|
|
89
|
+
title: rowTitle,
|
|
90
|
+
kind,
|
|
91
|
+
evidence: [catalogTestFile(code), ...(extra ?? [])],
|
|
92
|
+
};
|
|
93
|
+
if (notes !== undefined) scenario.notes = notes;
|
|
94
|
+
if (divergenceId !== undefined) scenario.divergenceId = divergenceId;
|
|
95
|
+
return scenario;
|
|
96
|
+
}),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Construct-level drop-in parity catalog. Every scenario ID here must execute
|
|
3
|
+
* in `tests/contract/catalog/<code>.test.ts` — the gate enforces the mapping.
|
|
4
|
+
*/
|
|
5
|
+
import { type CatalogSection, SCENARIO_ID_RE, type Scenario } from "./scenario-types.ts";
|
|
6
|
+
import { AGG_SECTION } from "./sections/agg.ts";
|
|
7
|
+
import { API_SECTION } from "./sections/api.ts";
|
|
8
|
+
import { ARR_SECTION } from "./sections/arr.ts";
|
|
9
|
+
import { CAT_SECTION } from "./sections/cat.ts";
|
|
10
|
+
import { CON_SECTION } from "./sections/con.ts";
|
|
11
|
+
import { CPY_SECTION } from "./sections/cpy.ts";
|
|
12
|
+
import { CTE_SECTION } from "./sections/cte.ts";
|
|
13
|
+
import { DAT_SECTION } from "./sections/dat.ts";
|
|
14
|
+
import { DDL_SECTION } from "./sections/ddl.ts";
|
|
15
|
+
import { DET_SECTION } from "./sections/det.ts";
|
|
16
|
+
import { DML_SECTION } from "./sections/dml.ts";
|
|
17
|
+
import { ECO_SECTION } from "./sections/eco.ts";
|
|
18
|
+
import { ERR_SECTION } from "./sections/err.ts";
|
|
19
|
+
import { EXP_SECTION } from "./sections/exp.ts";
|
|
20
|
+
import { FUN_SECTION } from "./sections/fun.ts";
|
|
21
|
+
import { FZZ_SECTION } from "./sections/fzz.ts";
|
|
22
|
+
import { GUC_SECTION } from "./sections/guc.ts";
|
|
23
|
+
import { JOI_SECTION } from "./sections/joi.ts";
|
|
24
|
+
import { JSN_SECTION } from "./sections/jsn.ts";
|
|
25
|
+
import { LIM_SECTION } from "./sections/lim.ts";
|
|
26
|
+
import { PAR_SECTION } from "./sections/par.ts";
|
|
27
|
+
import { PRE_SECTION } from "./sections/pre.ts";
|
|
28
|
+
import { SCH_SECTION } from "./sections/sch.ts";
|
|
29
|
+
import { SEL_SECTION } from "./sections/sel.ts";
|
|
30
|
+
import { SEQ_SECTION } from "./sections/seq.ts";
|
|
31
|
+
import { SNP_SECTION } from "./sections/snp.ts";
|
|
32
|
+
import { TOK_SECTION } from "./sections/tok.ts";
|
|
33
|
+
import { TRG_SECTION } from "./sections/trg.ts";
|
|
34
|
+
import { TSR_SECTION } from "./sections/tsr.ts";
|
|
35
|
+
import { TXN_SECTION } from "./sections/txn.ts";
|
|
36
|
+
import { TYP_SECTION } from "./sections/typ.ts";
|
|
37
|
+
import { UNI_SECTION } from "./sections/uni.ts";
|
|
38
|
+
import { WIN_SECTION } from "./sections/win.ts";
|
|
39
|
+
|
|
40
|
+
export const SCENARIO_CATALOG: CatalogSection[] = [
|
|
41
|
+
TOK_SECTION,
|
|
42
|
+
PAR_SECTION,
|
|
43
|
+
TYP_SECTION,
|
|
44
|
+
EXP_SECTION,
|
|
45
|
+
FUN_SECTION,
|
|
46
|
+
DAT_SECTION,
|
|
47
|
+
JSN_SECTION,
|
|
48
|
+
ARR_SECTION,
|
|
49
|
+
AGG_SECTION,
|
|
50
|
+
WIN_SECTION,
|
|
51
|
+
SEL_SECTION,
|
|
52
|
+
JOI_SECTION,
|
|
53
|
+
CTE_SECTION,
|
|
54
|
+
DDL_SECTION,
|
|
55
|
+
DML_SECTION,
|
|
56
|
+
CON_SECTION,
|
|
57
|
+
SEQ_SECTION,
|
|
58
|
+
TRG_SECTION,
|
|
59
|
+
TXN_SECTION,
|
|
60
|
+
GUC_SECTION,
|
|
61
|
+
SCH_SECTION,
|
|
62
|
+
CAT_SECTION,
|
|
63
|
+
TSR_SECTION,
|
|
64
|
+
CPY_SECTION,
|
|
65
|
+
PRE_SECTION,
|
|
66
|
+
API_SECTION,
|
|
67
|
+
SNP_SECTION,
|
|
68
|
+
DET_SECTION,
|
|
69
|
+
ERR_SECTION,
|
|
70
|
+
UNI_SECTION,
|
|
71
|
+
LIM_SECTION,
|
|
72
|
+
FZZ_SECTION,
|
|
73
|
+
ECO_SECTION,
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
export function allScenarios(): Scenario[] {
|
|
77
|
+
return SCENARIO_CATALOG.flatMap((section) => section.scenarios);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function scenarioById(): Map<string, Scenario> {
|
|
81
|
+
return new Map(allScenarios().map((scenario) => [scenario.id, scenario]));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function knownScenarioIds(): Set<string> {
|
|
85
|
+
return new Set(allScenarios().map((scenario) => scenario.id));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const seen = new Set<string>();
|
|
89
|
+
for (const section of SCENARIO_CATALOG) {
|
|
90
|
+
for (const scenario of section.scenarios) {
|
|
91
|
+
if (!SCENARIO_ID_RE.test(scenario.id)) throw new Error(`bad scenario id: ${scenario.id}`);
|
|
92
|
+
if (!scenario.id.startsWith(`${section.code}-`)) {
|
|
93
|
+
throw new Error(`scenario ${scenario.id} does not belong to section ${section.code}`);
|
|
94
|
+
}
|
|
95
|
+
if (seen.has(scenario.id)) throw new Error(`duplicate scenario id: ${scenario.id}`);
|
|
96
|
+
seen.add(scenario.id);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
export const AGG_SECTION: CatalogSection = section("AGG", "Aggregate functions", true, [
|
|
4
|
+
["cnt-01", "count star column constant and NULL"],
|
|
5
|
+
["cnt-02", "count DISTINCT incl row values"],
|
|
6
|
+
["sum-01", "sum over ints numerics floats"],
|
|
7
|
+
["sum-02", "sum and avg result types"],
|
|
8
|
+
["sum-03", "bigint sum avoids overflow via numeric"],
|
|
9
|
+
["avg-01", "avg over ints and filters nulls"],
|
|
10
|
+
["minmax-01", "min max over ints and text"],
|
|
11
|
+
["minmax-02", "min max over dates and intervals"],
|
|
12
|
+
["empty-01", "aggregates over an empty table"],
|
|
13
|
+
["empty-02", "aggregates over all-NULL input"],
|
|
14
|
+
["str-01", "string_agg with ORDER BY and delimiters"],
|
|
15
|
+
["str-02", "string_agg NULL handling and NULL separator"],
|
|
16
|
+
["str-03", "string_agg per group"],
|
|
17
|
+
["arr-01", "array_agg ordered incl NULLs"],
|
|
18
|
+
["arr-02", "array_agg empty input and per group"],
|
|
19
|
+
["jsn-01", "json_agg and jsonb_agg"],
|
|
20
|
+
["jsn-02", "json_object_agg and jsonb_object_agg"],
|
|
21
|
+
["bool-01", "bool_and bool_or every"],
|
|
22
|
+
["bool-02", "bool aggregates over empty input"],
|
|
23
|
+
["bit-01", "bit_and bit_or bit_xor"],
|
|
24
|
+
["dist-01", "DISTINCT inside sum and avg"],
|
|
25
|
+
["dist-02", "DISTINCT inside string_agg and array_agg"],
|
|
26
|
+
["fil-01", "FILTER WHERE on aggregates"],
|
|
27
|
+
["fil-02", "FILTER with GROUP BY"],
|
|
28
|
+
["fil-03", "FILTER excluding all rows and with DISTINCT"],
|
|
29
|
+
["grp-01", "GROUP BY with HAVING"],
|
|
30
|
+
["grp-02", "GROUP BY expression"],
|
|
31
|
+
["grp-03", "aggregates over joins"],
|
|
32
|
+
["std-01", "stddev family"],
|
|
33
|
+
["std-02", "variance family"],
|
|
34
|
+
["std-03", "stddev variance degenerate inputs"],
|
|
35
|
+
["pct-01", "percentile_cont median and interpolation"],
|
|
36
|
+
["pct-02", "percentile_disc and bounds"],
|
|
37
|
+
["pct-03", "percentile over empty input"],
|
|
38
|
+
["mode-01", "mode and tie-breaking"],
|
|
39
|
+
["corr-01", "corr and covariance"],
|
|
40
|
+
["corr-02", "linear regression family"],
|
|
41
|
+
["expr-01", "aggregates inside expressions and CASE"],
|
|
42
|
+
["ord-01", "ORDER BY inside plain aggregates"],
|
|
43
|
+
["sub-01", "aggregate in a correlated subquery"],
|
|
44
|
+
["err-01", "undefined column inside aggregate errors"],
|
|
45
|
+
]);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
const D = "documented_divergence" as const;
|
|
4
|
+
const DIV = "sync-api-surface";
|
|
5
|
+
|
|
6
|
+
export const API_SECTION: CatalogSection = section("API", "JavaScript surface contracts", true, [
|
|
7
|
+
["exec-01", "exec runs multiple statements", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
8
|
+
["exec-02", "exec rejects bind parameters", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
9
|
+
["query-01", "query and prepare are single-statement", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
10
|
+
["query-02", "query positional $n binds"],
|
|
11
|
+
["prep-01", "prepare-time syntax errors", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
12
|
+
["prep-02", "prepared statement reuse"],
|
|
13
|
+
["prep-03", "re-executed statement sees ALTER TABLE", undefined, undefined, ["tests/contract/api/"]],
|
|
14
|
+
["run-01", "run/all/get/result shapes", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
15
|
+
["run-02", "get returns undefined for zero rows", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
16
|
+
["run-03", "result keeps column metadata for zero rows", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
17
|
+
["run-04", "all on INSERT RETURNING"],
|
|
18
|
+
["bind-01", "accepted bind types"],
|
|
19
|
+
["bind-02", "rejected bind types throw misuse", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
20
|
+
["bind-03", "bigint binds enforce int8 range", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
21
|
+
["ret-01", "int8 results surface as JS bigint", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
22
|
+
["ret-02", "numeric/date/jsonb surface as canonical text", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
23
|
+
["close-01", "close is idempotent; use after close is misuse", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
24
|
+
["txn-01", "transaction(fn) commits and rolls back", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
25
|
+
["txn-02", "nested transaction(fn) uses savepoints", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
26
|
+
["sync-01", "methods return values, not Promises", D, "JS API surface, no oracle analog", undefined, DIV],
|
|
27
|
+
["copy-01", "copyFrom API loads COPY FROM STDIN data", D, "API-level COPY hook", ["tests/contract/copy/"], DIV],
|
|
28
|
+
]);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
export const ARR_SECTION: CatalogSection = section("ARR", "Arrays", true, [
|
|
4
|
+
["lit-01", "ARRAY constructor int and text"],
|
|
5
|
+
["lit-02", "text literal input incl quoted elements"],
|
|
6
|
+
["lit-03", "empty arrays typed"],
|
|
7
|
+
["lit-04", "NULL elements rendering"],
|
|
8
|
+
["lit-05", "expression elements and coercion"],
|
|
9
|
+
["lit-06", "multi-dim constructor and literal"],
|
|
10
|
+
["lit-07", "ARRAY from a subquery"],
|
|
11
|
+
["sub-01", "one-based subscripting"],
|
|
12
|
+
["sub-02", "out-of-range zero negative subscripts are NULL"],
|
|
13
|
+
["sub-03", "column and expression subscripts"],
|
|
14
|
+
["sub-04", "multi-dim subscripts and partial access"],
|
|
15
|
+
["slice-01", "basic slices"],
|
|
16
|
+
["slice-02", "open-ended slices"],
|
|
17
|
+
["slice-03", "clamped and empty slices"],
|
|
18
|
+
["slice-04", "multi-dim slices"],
|
|
19
|
+
["meta-01", "array_length and cardinality"],
|
|
20
|
+
["meta-02", "array_dims ndims upper lower"],
|
|
21
|
+
["srf-01", "unnest in FROM"],
|
|
22
|
+
["srf-02", "unnest in the SELECT list"],
|
|
23
|
+
["srf-03", "unnest WITH ORDINALITY"],
|
|
24
|
+
["srf-04", "multi-argument unnest"],
|
|
25
|
+
["srf-05", "generate_subscripts forward and reverse"],
|
|
26
|
+
["agg-01", "array_agg with ORDER BY and DISTINCT"],
|
|
27
|
+
["agg-02", "unnest array_agg round trip per group"],
|
|
28
|
+
["op-01", "|| concatenation element and array forms"],
|
|
29
|
+
["op-02", "@> and <@ containment"],
|
|
30
|
+
["op-03", "&& overlap"],
|
|
31
|
+
["op-04", "equality and lexicographic ordering"],
|
|
32
|
+
["op-05", "comparisons with NULL elements"],
|
|
33
|
+
["fn-01", "array_append prepend cat"],
|
|
34
|
+
["fn-02", "array_remove and array_replace"],
|
|
35
|
+
["fn-03", "array_position and array_positions"],
|
|
36
|
+
["fn-04", "array_to_string with NULL handling"],
|
|
37
|
+
["fn-05", "string_to_array with null token"],
|
|
38
|
+
["fn-06", "array_fill and trim_array"],
|
|
39
|
+
["any-01", "ANY over arrays"],
|
|
40
|
+
["any-02", "ALL and non-equality operators"],
|
|
41
|
+
["where-01", "array predicates filter rows in WHERE"],
|
|
42
|
+
["store-01", "stored arrays in GROUP BY and DISTINCT"],
|
|
43
|
+
["err-01", "malformed array literal errors"],
|
|
44
|
+
["err-02", "ragged multi-dim constructor errors"],
|
|
45
|
+
]);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
const D = "documented_divergence" as const;
|
|
4
|
+
|
|
5
|
+
export const CAT_SECTION: CatalogSection = section("CAT", "pg_catalog and information_schema", true, [
|
|
6
|
+
["class-01", "user table appears in pg_class with relkind r"],
|
|
7
|
+
["class-02", "view appears in pg_class with relkind v"],
|
|
8
|
+
["class-03", "sequence appears in pg_class with relkind S"],
|
|
9
|
+
["class-04", "pg_class joined to pg_namespace resolves the schema"],
|
|
10
|
+
["class-05", "pg_class row disappears after DROP TABLE"],
|
|
11
|
+
["attr-01", "pg_attribute lists user columns in order"],
|
|
12
|
+
["attr-02", "pg_attribute attnotnull reflects NOT NULL and PK"],
|
|
13
|
+
["attr-03", "pg_attribute joined to pg_type resolves column types"],
|
|
14
|
+
["type-01", "pg_type has entries for builtin type names"],
|
|
15
|
+
["ns-01", "system schemas present in pg_namespace"],
|
|
16
|
+
["proc-01", "user function appears in pg_proc"],
|
|
17
|
+
["proc-02", "overloads produce multiple pg_proc rows"],
|
|
18
|
+
["proc-03", "builtin function present in pg_proc"],
|
|
19
|
+
["tabs-01", "pg_tables shows the user table with its schema"],
|
|
20
|
+
["views-01", "pg_views shows the user view"],
|
|
21
|
+
["info-01", "information_schema.tables reports the user table"],
|
|
22
|
+
["info-02", "information_schema.tables reports views as VIEW"],
|
|
23
|
+
["info-03", "information_schema.columns basic shape"],
|
|
24
|
+
["info-04", "information_schema.columns ordinal positions"],
|
|
25
|
+
["info-05", "information_schema.columns numeric data types"],
|
|
26
|
+
["cons-01", "information_schema.table_constraints for PK, UNIQUE, CHECK"],
|
|
27
|
+
["cons-02", "information_schema.key_column_usage lists key columns"],
|
|
28
|
+
["cons-03", "foreign key appears in table_constraints"],
|
|
29
|
+
["fn-01", "current_database() and current_schema() shapes"],
|
|
30
|
+
["fn-02", "version() reports a PostgreSQL banner"],
|
|
31
|
+
[
|
|
32
|
+
"ver-01",
|
|
33
|
+
"version() full text names postgres-mem",
|
|
34
|
+
D,
|
|
35
|
+
"memory: 'PostgreSQL 18.3 (postgres-mem) on TypeScript, in-memory engine'; oracle reports the real build banner",
|
|
36
|
+
undefined,
|
|
37
|
+
"version-banner",
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
"viewdef-01",
|
|
41
|
+
"pg_get_viewdef is not implemented",
|
|
42
|
+
D,
|
|
43
|
+
"memory: 42883 function pg_get_viewdef(...) does not exist; PostgreSQL returns the view definition",
|
|
44
|
+
undefined,
|
|
45
|
+
"pg-get-viewdef-missing",
|
|
46
|
+
],
|
|
47
|
+
]);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
export const CON_SECTION: CatalogSection = section("CON", "Constraints & enforcement", true, [
|
|
4
|
+
["nn-01", "NOT NULL violation on INSERT (23502)"],
|
|
5
|
+
["nn-02", "NOT NULL violation on UPDATE"],
|
|
6
|
+
["nn-03", "DEFAULT satisfies NOT NULL"],
|
|
7
|
+
["ck-01", "named CHECK violation on INSERT (23514)"],
|
|
8
|
+
["ck-02", "CHECK evaluating to NULL passes"],
|
|
9
|
+
["ck-03", "table-level multi-column CHECK"],
|
|
10
|
+
["ck-04", "CHECK enforced on UPDATE"],
|
|
11
|
+
["uq-01", "UNIQUE violation on INSERT (23505)"],
|
|
12
|
+
["uq-02", "UNIQUE allows multiple NULLs"],
|
|
13
|
+
["uq-03", "composite UNIQUE blocks full duplicates only"],
|
|
14
|
+
["pk-01", "PRIMARY KEY duplicate violation"],
|
|
15
|
+
["pk-02", "PRIMARY KEY rejects NULL (23502)"],
|
|
16
|
+
["pk-03", "composite PRIMARY KEY"],
|
|
17
|
+
["fk-01", "FK insert violation (23503)"],
|
|
18
|
+
["fk-02", "parent DELETE blocked by default NO ACTION"],
|
|
19
|
+
["fk-03", "parent key UPDATE blocked by FK"],
|
|
20
|
+
["fk-04", "ON DELETE CASCADE"],
|
|
21
|
+
["fk-05", "ON DELETE SET NULL"],
|
|
22
|
+
["fk-06", "ON DELETE SET DEFAULT"],
|
|
23
|
+
["fk-07", "ON UPDATE CASCADE"],
|
|
24
|
+
["fk-08", "ON UPDATE SET NULL"],
|
|
25
|
+
["fk-09", "composite FK violation"],
|
|
26
|
+
["fk-10", "NULL child reference bypasses FK"],
|
|
27
|
+
["defer-01", "DEFERRABLE INITIALLY IMMEDIATE still enforces"],
|
|
28
|
+
["defer-02", "DEFERRABLE INITIALLY DEFERRED parses and enforces outside txn"],
|
|
29
|
+
["addcon-01", "ALTER TABLE ADD CONSTRAINT CHECK is enforced"],
|
|
30
|
+
["addcon-02", "ALTER TABLE ADD CONSTRAINT UNIQUE is enforced"],
|
|
31
|
+
["dropcon-01", "DROP CONSTRAINT lifts enforcement"],
|
|
32
|
+
]);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
const D = "documented_divergence" as const;
|
|
4
|
+
const CPY_NOTE =
|
|
5
|
+
"COPY data flows through the JS copyFrom API / result rows; the PGlite adapter streams COPY separately, so no differential compare is possible";
|
|
6
|
+
const EXTRA = ["tests/contract/copy/"];
|
|
7
|
+
const DIV = "copy-stdin-api";
|
|
8
|
+
|
|
9
|
+
export const CPY_SECTION: CatalogSection = section("CPY", "COPY", true, [
|
|
10
|
+
["from-01", "COPY FROM STDIN text loads rows and returns the count", D, CPY_NOTE, EXTRA, DIV],
|
|
11
|
+
["from-02", "\\N is NULL and text escapes decode", D, CPY_NOTE, EXTRA, DIV],
|
|
12
|
+
["from-03", "\\. terminates the stream", D, CPY_NOTE, EXTRA, DIV],
|
|
13
|
+
["from-04", "column list may reorder and omit columns", D, CPY_NOTE, EXTRA, DIV],
|
|
14
|
+
["from-05", "values pass through type input and constraints", D, CPY_NOTE, EXTRA, DIV],
|
|
15
|
+
["csv-01", "csv quoted fields, delimiters, doubled quotes", D, CPY_NOTE, EXTRA, DIV],
|
|
16
|
+
["csv-02", "csv empty unquoted is NULL; quoted empty is not", D, CPY_NOTE, EXTRA, DIV],
|
|
17
|
+
["csv-03", "csv HEADER, DELIMITER, and NULL options", D, CPY_NOTE, EXTRA, DIV],
|
|
18
|
+
["to-01", "COPY TO STDOUT text renders \\N nulls and escapes", D, CPY_NOTE, EXTRA, DIV],
|
|
19
|
+
["to-02", "COPY TO STDOUT csv quotes only when needed", D, CPY_NOTE, EXTRA, DIV],
|
|
20
|
+
["to-03", "COPY (SELECT ...) TO STDOUT supports queries", D, CPY_NOTE, EXTRA, DIV],
|
|
21
|
+
["to-04", "COPY TO STDOUT respects the column list", D, CPY_NOTE, EXTRA, DIV],
|
|
22
|
+
["rt-01", "COPY TO output round-trips through COPY FROM", D, CPY_NOTE, EXTRA, DIV],
|
|
23
|
+
["api-01", "copyFrom rejects non-COPY statements as misuse", D, CPY_NOTE, EXTRA, DIV],
|
|
24
|
+
]);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
export const CTE_SECTION: CatalogSection = section("CTE", "Common table expressions", true, [
|
|
4
|
+
["basic-01", "basic WITH"],
|
|
5
|
+
["cols-01", "CTE column-alias list"],
|
|
6
|
+
["multi-01", "multiple CTEs in one WITH"],
|
|
7
|
+
["chain-01", "CTE references an earlier CTE"],
|
|
8
|
+
["ref-01", "CTE referenced multiple times"],
|
|
9
|
+
["shadow-01", "CTE shadows a real table"],
|
|
10
|
+
["mat-01", "MATERIALIZED hint"],
|
|
11
|
+
["mat-02", "NOT MATERIALIZED hint"],
|
|
12
|
+
["nest-01", "CTE referenced from a subquery"],
|
|
13
|
+
["agg-01", "aggregate over a CTE"],
|
|
14
|
+
["set-01", "CTEs feeding a set operation"],
|
|
15
|
+
["err-01", "forward CTE reference errors"],
|
|
16
|
+
["err-02", "self-reference without RECURSIVE errors"],
|
|
17
|
+
["err-03", "too many CTE column aliases errors"],
|
|
18
|
+
["rec-01", "WITH RECURSIVE integer series"],
|
|
19
|
+
["rec-02", "recursive UNION dedup terminates cycles"],
|
|
20
|
+
["rec-03", "recursive tree walk with depth"],
|
|
21
|
+
["rec-04", "recursive path accumulation"],
|
|
22
|
+
["rec-05", "recursion terminated by WHERE"],
|
|
23
|
+
["rec-06", "LIMIT over a recursive result"],
|
|
24
|
+
["rec-07", "multi-column recursion"],
|
|
25
|
+
["dml-01", "WITH INSERT RETURNING read by outer SELECT"],
|
|
26
|
+
["dml-02", "WITH UPDATE RETURNING read by outer SELECT"],
|
|
27
|
+
["dml-03", "WITH DELETE RETURNING read by outer SELECT"],
|
|
28
|
+
["dml-04", "modifying CTE feeding an INSERT"],
|
|
29
|
+
]);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
const D = "documented_divergence" as const;
|
|
4
|
+
|
|
5
|
+
export const DAT_SECTION: CatalogSection = section("DAT", "Date/time types & intervals", true, [
|
|
6
|
+
["lit-01", "date literals and text casts"],
|
|
7
|
+
["lit-02", "timestamp literals incl fractional seconds and T separator"],
|
|
8
|
+
["lit-03", "time literals"],
|
|
9
|
+
["lit-04", "timestamptz literals and offset normalization"],
|
|
10
|
+
["lit-05", "special values epoch and infinity"],
|
|
11
|
+
["cast-01", "casts among date timestamp time"],
|
|
12
|
+
["ex-01", "extract date and time fields"],
|
|
13
|
+
["ex-02", "extract dow isodow doy week"],
|
|
14
|
+
["ex-03", "extract quarter century decade millennium"],
|
|
15
|
+
["ex-04", "extract isoyear at year boundary"],
|
|
16
|
+
["ex-05", "extract epoch from timestamp date interval"],
|
|
17
|
+
["ex-06", "extract vs date_part result types"],
|
|
18
|
+
["ex-07", "extract fields from intervals"],
|
|
19
|
+
["trunc-01", "date_trunc fine fields"],
|
|
20
|
+
["trunc-02", "date_trunc coarse fields"],
|
|
21
|
+
["trunc-03", "date_trunc on interval"],
|
|
22
|
+
["age-01", "age of two timestamps both directions"],
|
|
23
|
+
["arith-01", "date plus/minus integer days"],
|
|
24
|
+
["arith-02", "date arithmetic result types"],
|
|
25
|
+
["arith-03", "timestamp plus/minus interval"],
|
|
26
|
+
["arith-04", "timestamp difference is interval"],
|
|
27
|
+
["arith-05", "month-end clamping and leap-year arithmetic"],
|
|
28
|
+
["arith-06", "time plus interval wraps midnight"],
|
|
29
|
+
["iv-01", "interval unit literals plural and abbreviated"],
|
|
30
|
+
["iv-02", "SQL-standard and ISO 8601 interval input"],
|
|
31
|
+
["iv-03", "mixed-sign interval formatting and ago"],
|
|
32
|
+
["iv-04", "fractional interval units spill down"],
|
|
33
|
+
["iv-05", "interval addition subtraction negation"],
|
|
34
|
+
["iv-06", "interval multiplication and division"],
|
|
35
|
+
["iv-07", "interval comparisons across units"],
|
|
36
|
+
["just-01", "justify_hours and justify_days"],
|
|
37
|
+
["just-02", "justify_interval and negative inputs"],
|
|
38
|
+
["mk-01", "make_date and make_time"],
|
|
39
|
+
["mk-02", "make_timestamp and make_timestamptz"],
|
|
40
|
+
["mk-03", "make_interval positional and named"],
|
|
41
|
+
["fmt-01", "to_char date and time patterns"],
|
|
42
|
+
["fmt-02", "to_char on intervals"],
|
|
43
|
+
["fmt-03", "to_date parsing"],
|
|
44
|
+
["ovl-01", "OVERLAPS operator half-open semantics"],
|
|
45
|
+
["fin-01", "isfinite on date timestamp interval"],
|
|
46
|
+
["edge-01", "year one and century boundaries"],
|
|
47
|
+
["ord-01", "ORDER BY date and interval columns"],
|
|
48
|
+
[
|
|
49
|
+
"now-01",
|
|
50
|
+
"now/current_date fixed to 2000-01-01",
|
|
51
|
+
D,
|
|
52
|
+
"deterministic fixed now",
|
|
53
|
+
["tests/contract/determinism/"],
|
|
54
|
+
"deterministic-runtime",
|
|
55
|
+
],
|
|
56
|
+
["err-01", "out-of-range date fields error"],
|
|
57
|
+
["err-02", "garbage date text errors"],
|
|
58
|
+
["err-03", "invalid time errors"],
|
|
59
|
+
["err-04", "invalid interval text errors"],
|
|
60
|
+
]);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
const D = "documented_divergence" as const;
|
|
4
|
+
|
|
5
|
+
export const DDL_SECTION: CatalogSection = section("DDL", "Schema definition", true, [
|
|
6
|
+
["ct-01", "CREATE TABLE with common column types"],
|
|
7
|
+
["ct-02", "column defaults including expressions"],
|
|
8
|
+
["ct-03", "CREATE TABLE IF NOT EXISTS is idempotent"],
|
|
9
|
+
["ct-04", "duplicate table name errors"],
|
|
10
|
+
["ct-05", "quoted mixed-case identifiers"],
|
|
11
|
+
["ctas-01", "CREATE TABLE AS SELECT"],
|
|
12
|
+
["ctas-02", "CTAS WITH NO DATA keeps shape only"],
|
|
13
|
+
["ctas-03", "CTAS column name overrides"],
|
|
14
|
+
["drop-01", "DROP TABLE and DROP TABLE IF EXISTS"],
|
|
15
|
+
["drop-02", "DROP of a missing table errors"],
|
|
16
|
+
[
|
|
17
|
+
"drop-03",
|
|
18
|
+
"DROP TABLE CASCADE leaves dependent views behind",
|
|
19
|
+
D,
|
|
20
|
+
"oracle drops the dependent view; memory keeps a broken view (see tests/contract/_reports/catalog-querydml.md)",
|
|
21
|
+
undefined,
|
|
22
|
+
"drop-cascade-view-retained",
|
|
23
|
+
],
|
|
24
|
+
["alter-01", "ADD COLUMN with default backfills rows"],
|
|
25
|
+
["alter-02", "DROP COLUMN removes data and star output"],
|
|
26
|
+
["alter-03", "RENAME COLUMN"],
|
|
27
|
+
["alter-04", "RENAME TABLE"],
|
|
28
|
+
["view-01", "CREATE VIEW and query through it"],
|
|
29
|
+
["view-02", "view column-alias list"],
|
|
30
|
+
["view-03", "view on view"],
|
|
31
|
+
["view-04", "CREATE OR REPLACE VIEW swaps definition"],
|
|
32
|
+
["view-05", "DROP VIEW and IF EXISTS"],
|
|
33
|
+
["idx-01", "CREATE INDEX never changes results"],
|
|
34
|
+
["idx-02", "UNIQUE INDEX rejects duplicates"],
|
|
35
|
+
["idx-03", "partial unique index scopes enforcement"],
|
|
36
|
+
["idx-04", "expression unique index"],
|
|
37
|
+
["idx-05", "DROP INDEX lifts enforcement"],
|
|
38
|
+
["schema-01", "CREATE SCHEMA with qualified tables"],
|
|
39
|
+
["schema-02", "DROP SCHEMA CASCADE"],
|
|
40
|
+
["temp-01", "temp table lifecycle"],
|
|
41
|
+
["enum-01", "CREATE TYPE AS ENUM ordering and usage"],
|
|
42
|
+
["enum-02", "invalid enum literal errors"],
|
|
43
|
+
["domain-01", "CREATE DOMAIN accepted values"],
|
|
44
|
+
["domain-02", "domain CHECK violation errors"],
|
|
45
|
+
["gen-01", "generated STORED column on insert"],
|
|
46
|
+
["gen-02", "generated column recomputes on UPDATE"],
|
|
47
|
+
[
|
|
48
|
+
"comment-01",
|
|
49
|
+
"COMMENT ON TABLE parses but is not stored",
|
|
50
|
+
D,
|
|
51
|
+
"oracle stores the comment; memory obj_description(oid) returns NULL (see tests/contract/_reports/catalog-querydml.md)",
|
|
52
|
+
undefined,
|
|
53
|
+
"comment-on-not-stored",
|
|
54
|
+
],
|
|
55
|
+
]);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
const D = "documented_divergence" as const;
|
|
4
|
+
const DET_NOTE = "deterministic random/now by design";
|
|
5
|
+
const EXTRA = ["tests/contract/determinism/"];
|
|
6
|
+
|
|
7
|
+
const DIV = "deterministic-runtime";
|
|
8
|
+
|
|
9
|
+
export const DET_SECTION: CatalogSection = section("DET", "Determinism invariants", true, [
|
|
10
|
+
["seed-01", "same seed identical random streams", D, DET_NOTE, EXTRA, DIV],
|
|
11
|
+
["seed-02", "different seeds diverge", D, DET_NOTE, EXTRA, DIV],
|
|
12
|
+
["now-01", "now() fixed to 2000-01-01 by default", D, DET_NOTE, EXTRA, DIV],
|
|
13
|
+
["now-02", "injectable clock overrides now", D, DET_NOTE, EXTRA, DIV],
|
|
14
|
+
["uuid-01", "gen_random_uuid deterministic under seed", D, DET_NOTE, EXTRA, DIV],
|
|
15
|
+
["rb-01", "PRNG rolls back with ROLLBACK", D, DET_NOTE, EXTRA, DIV],
|
|
16
|
+
["snap-01", "random() stream continues after restore", D, DET_NOTE, EXTRA, DIV],
|
|
17
|
+
["setseed-01", "setseed + random repeatable", D, DET_NOTE, EXTRA, DIV],
|
|
18
|
+
["scan-01", "scan and aggregation order stable across restore", D, DET_NOTE, EXTRA, DIV],
|
|
19
|
+
["negzero-01", "float8 -0 keeps its sign like PostgreSQL"],
|
|
20
|
+
]);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
export const DML_SECTION: CatalogSection = section("DML", "Data modification", true, [
|
|
4
|
+
["ins-01", "single-row INSERT"],
|
|
5
|
+
["ins-02", "multi-row VALUES INSERT"],
|
|
6
|
+
["ins-03", "INSERT ... SELECT"],
|
|
7
|
+
["ins-04", "INSERT ... SELECT from the same table"],
|
|
8
|
+
["ins-05", "INSERT DEFAULT VALUES"],
|
|
9
|
+
["ins-06", "DEFAULT keyword inside VALUES"],
|
|
10
|
+
["ins-07", "column list reorders values"],
|
|
11
|
+
["ins-08", "zero-row INSERT ... SELECT command tag"],
|
|
12
|
+
["ret-01", "INSERT RETURNING *"],
|
|
13
|
+
["ret-02", "INSERT RETURNING expressions"],
|
|
14
|
+
["ret-03", "UPDATE RETURNING"],
|
|
15
|
+
["ret-04", "DELETE RETURNING"],
|
|
16
|
+
["upd-01", "UPDATE with expressions"],
|
|
17
|
+
["upd-02", "UPDATE row count for WHERE subset"],
|
|
18
|
+
["upd-03", "UPDATE all rows command tag"],
|
|
19
|
+
["upd-04", "UPDATE ... FROM join"],
|
|
20
|
+
["upd-05", "UPDATE SET (a, b) = row literal"],
|
|
21
|
+
["upd-06", "UPDATE SET (a, b) = scalar subquery row"],
|
|
22
|
+
["upd-07", "zero-row UPDATE command tag"],
|
|
23
|
+
["del-01", "DELETE with WHERE"],
|
|
24
|
+
["del-02", "DELETE all rows command tag"],
|
|
25
|
+
["del-03", "DELETE USING join"],
|
|
26
|
+
["del-04", "zero-row DELETE command tag"],
|
|
27
|
+
["conf-01", "ON CONFLICT DO NOTHING without target"],
|
|
28
|
+
["conf-02", "ON CONFLICT (col) DO NOTHING"],
|
|
29
|
+
["conf-03", "DO UPDATE with EXCLUDED"],
|
|
30
|
+
["conf-04", "DO UPDATE referencing the existing row"],
|
|
31
|
+
["conf-05", "DO UPDATE with WHERE clause"],
|
|
32
|
+
["conf-06", "ON CONFLICT ON CONSTRAINT target"],
|
|
33
|
+
["conf-07", "composite conflict target"],
|
|
34
|
+
["conf-08", "upsert RETURNING"],
|
|
35
|
+
["trunc-01", "TRUNCATE empties the table"],
|
|
36
|
+
["trunc-02", "TRUNCATE RESTART IDENTITY resets sequences"],
|
|
37
|
+
]);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CatalogSection, section } from "../scenario-types.ts";
|
|
2
|
+
|
|
3
|
+
const E = "ecosystem" as const;
|
|
4
|
+
|
|
5
|
+
export const ECO_SECTION: CatalogSection = section("ECO", "Ecosystem / ORM smoke", true, [
|
|
6
|
+
["prisma-01", "Prisma-style information_schema.columns introspection", E],
|
|
7
|
+
["drizzle-01", "Drizzle-style pg_catalog column and type introspection", E],
|
|
8
|
+
["kysely-01", "Kysely-style table listing from pg_class", E],
|
|
9
|
+
["knex-01", "knex-style CRUD round trip with RETURNING", E],
|
|
10
|
+
["typeorm-01", "TypeORM-style constraint introspection", E],
|
|
11
|
+
["mig-01", "migration-runner transactional DDL", E],
|
|
12
|
+
["crud-01", "ORM-style serial primary key insert flow", E],
|
|
13
|
+
["intro-01", "schema listing from information_schema.tables", E],
|
|
14
|
+
["intro-02", "sequence discovery via pg_sequences", E],
|
|
15
|
+
["param-01", "driver-style positional parameter binding", E],
|
|
16
|
+
]);
|