@intentius/chant-lexicon-sql 0.121.1 → 0.123.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/README.md +1 -1
- package/dist/clickhouse/catalog-types.d.ts +8 -0
- package/dist/clickhouse/catalog-types.d.ts.map +1 -1
- package/dist/clickhouse/entities.d.ts +37 -11
- package/dist/clickhouse/entities.d.ts.map +1 -1
- package/dist/clickhouse/import/generator.d.ts.map +1 -1
- package/dist/clickhouse/overlays/codecs.d.ts.map +1 -1
- package/dist/clickhouse/overlays/kinds.d.ts +1 -1
- package/dist/clickhouse/overlays/kinds.d.ts.map +1 -1
- package/dist/clickhouse/overlays/types.d.ts.map +1 -1
- package/dist/clickhouse/plan/commands.d.ts.map +1 -1
- package/dist/clickhouse/row-types.d.ts +30 -0
- package/dist/clickhouse/row-types.d.ts.map +1 -0
- package/dist/clickhouse/type-syntax.d.ts +33 -0
- package/dist/clickhouse/type-syntax.d.ts.map +1 -0
- package/dist/clickhouse.d.ts +1 -1
- package/dist/clickhouse.d.ts.map +1 -1
- package/dist/codegen/clickhouse-module.d.ts.map +1 -1
- package/dist/codegen/postgres-module.d.ts.map +1 -1
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/typed.d.ts +132 -0
- package/dist/core/typed.d.ts.map +1 -0
- package/dist/generated/clickhouse.d.ts +7 -1
- package/dist/generated/clickhouse.d.ts.map +1 -1
- package/dist/generated/postgres.d.ts +6 -0
- package/dist/generated/postgres.d.ts.map +1 -1
- package/dist/integrity.json +27 -5
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/post-synth/audit-entries.d.ts.map +1 -1
- package/dist/lint/post-synth/clickhouse-type-check.d.ts +37 -0
- package/dist/lint/post-synth/clickhouse-type-check.d.ts.map +1 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/post-synth/postgres-audit-entries.d.ts.map +1 -1
- package/dist/lint/post-synth/postgres-names.d.ts +151 -0
- package/dist/lint/post-synth/postgres-names.d.ts.map +1 -0
- package/dist/lint/post-synth/sql101.d.ts +9 -0
- package/dist/lint/post-synth/sql101.d.ts.map +1 -0
- package/dist/lint/post-synth/sql102.d.ts +16 -0
- package/dist/lint/post-synth/sql102.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlch121.d.ts +10 -0
- package/dist/lint/post-synth/sqlch121.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlch122.d.ts +10 -0
- package/dist/lint/post-synth/sqlch122.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlch123.d.ts +9 -0
- package/dist/lint/post-synth/sqlch123.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlch124.d.ts +6 -0
- package/dist/lint/post-synth/sqlch124.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlch125.d.ts +11 -0
- package/dist/lint/post-synth/sqlch125.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlch126.d.ts +12 -0
- package/dist/lint/post-synth/sqlch126.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlch127.d.ts +22 -0
- package/dist/lint/post-synth/sqlch127.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlpg119.d.ts +18 -0
- package/dist/lint/post-synth/sqlpg119.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlpg120.d.ts +17 -0
- package/dist/lint/post-synth/sqlpg120.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlpg121.d.ts +12 -0
- package/dist/lint/post-synth/sqlpg121.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlpg122.d.ts +12 -0
- package/dist/lint/post-synth/sqlpg122.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlpg123.d.ts +17 -0
- package/dist/lint/post-synth/sqlpg123.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlpg124.d.ts +16 -0
- package/dist/lint/post-synth/sqlpg124.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlpg125.d.ts +17 -0
- package/dist/lint/post-synth/sqlpg125.d.ts.map +1 -0
- package/dist/lint/post-synth/sqlpg126.d.ts +19 -0
- package/dist/lint/post-synth/sqlpg126.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +3 -1
- package/dist/lint/rules/index.d.ts.map +1 -1
- package/dist/lint/rules/sqlch004.d.ts +19 -0
- package/dist/lint/rules/sqlch004.d.ts.map +1 -0
- package/dist/lint/rules/sqlpg005.d.ts +18 -0
- package/dist/lint/rules/sqlpg005.d.ts.map +1 -0
- package/dist/lint/rules/typed-names.d.ts +43 -0
- package/dist/lint/rules/typed-names.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/okf/index.md +19 -0
- package/dist/okf/rules/SQL101.md +23 -0
- package/dist/okf/rules/SQL102.md +11 -0
- package/dist/okf/rules/SQLCH004.md +11 -0
- package/dist/okf/rules/SQLCH121.md +11 -0
- package/dist/okf/rules/SQLCH122.md +11 -0
- package/dist/okf/rules/SQLCH123.md +11 -0
- package/dist/okf/rules/SQLCH124.md +18 -0
- package/dist/okf/rules/SQLCH125.md +11 -0
- package/dist/okf/rules/SQLCH126.md +15 -0
- package/dist/okf/rules/SQLCH127.md +15 -0
- package/dist/okf/rules/SQLPG005.md +11 -0
- package/dist/okf/rules/SQLPG119.md +16 -0
- package/dist/okf/rules/SQLPG120.md +16 -0
- package/dist/okf/rules/SQLPG121.md +11 -0
- package/dist/okf/rules/SQLPG122.md +15 -0
- package/dist/okf/rules/SQLPG123.md +16 -0
- package/dist/okf/rules/SQLPG124.md +11 -0
- package/dist/okf/rules/SQLPG125.md +11 -0
- package/dist/okf/rules/SQLPG126.md +11 -0
- package/dist/okf/types/Dictionary.md +4 -0
- package/dist/okf/types/Function.md +5 -0
- package/dist/okf/types/Grant.md +6 -0
- package/dist/okf/types/MaterializedView.md +1 -0
- package/dist/okf/types/PostgresDefaultPrivileges.md +4 -0
- package/dist/okf/types/PostgresDomain.md +2 -0
- package/dist/okf/types/PostgresEnum.md +1 -0
- package/dist/okf/types/PostgresFunction.md +4 -0
- package/dist/okf/types/PostgresGrant.md +5 -0
- package/dist/okf/types/PostgresPolicy.md +4 -0
- package/dist/okf/types/PostgresProcedure.md +4 -0
- package/dist/okf/types/PostgresSequence.md +2 -0
- package/dist/okf/types/PostgresTrigger.md +4 -0
- package/dist/okf/types/RowPolicy.md +4 -0
- package/dist/okf/types/Table.md +1 -0
- package/dist/okf/types/View.md +1 -0
- package/dist/postgres/entities.d.ts +38 -9
- package/dist/postgres/entities.d.ts.map +1 -1
- package/dist/postgres/import/generator.d.ts.map +1 -1
- package/dist/postgres/overlays/extension-objects.d.ts +28 -0
- package/dist/postgres/overlays/extension-objects.d.ts.map +1 -0
- package/dist/postgres/overlays/types.d.ts +10 -0
- package/dist/postgres/overlays/types.d.ts.map +1 -1
- package/dist/postgres/row-types.d.ts +17 -0
- package/dist/postgres/row-types.d.ts.map +1 -0
- package/dist/postgres/testing/migration.d.ts +3 -2
- package/dist/postgres/testing/migration.d.ts.map +1 -1
- package/dist/postgres.d.ts +1 -1
- package/dist/postgres.d.ts.map +1 -1
- package/dist/rules/audit-entries.ts +7 -0
- package/dist/rules/clickhouse-type-check.ts +173 -0
- package/dist/rules/postgres-audit-entries.ts +8 -0
- package/dist/rules/postgres-names.ts +510 -0
- package/dist/rules/sql101.ts +62 -0
- package/dist/rules/sql102.ts +34 -0
- package/dist/rules/sqlch004.ts +81 -0
- package/dist/rules/sqlch121.ts +12 -0
- package/dist/rules/sqlch122.ts +12 -0
- package/dist/rules/sqlch123.ts +11 -0
- package/dist/rules/sqlch124.ts +21 -0
- package/dist/rules/sqlch125.ts +56 -0
- package/dist/rules/sqlch126.ts +57 -0
- package/dist/rules/sqlch127.ts +128 -0
- package/dist/rules/sqlpg005.ts +73 -0
- package/dist/rules/sqlpg119.ts +37 -0
- package/dist/rules/sqlpg120.ts +70 -0
- package/dist/rules/sqlpg121.ts +32 -0
- package/dist/rules/sqlpg122.ts +28 -0
- package/dist/rules/sqlpg123.ts +63 -0
- package/dist/rules/sqlpg124.ts +47 -0
- package/dist/rules/sqlpg125.ts +40 -0
- package/dist/rules/sqlpg126.ts +37 -0
- package/dist/rules/typed-names.ts +120 -0
- package/dist/sql-types-command.d.ts +19 -0
- package/dist/sql-types-command.d.ts.map +1 -0
- package/dist/sql-types.d.ts +53 -0
- package/dist/sql-types.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/clickhouse/catalog-types.ts +9 -0
- package/src/clickhouse/dictionary.test.ts +1 -1
- package/src/clickhouse/entities.ts +79 -14
- package/src/clickhouse/import/generator.ts +7 -1
- package/src/clickhouse/import/roundtrip.test.ts +1 -1
- package/src/clickhouse/overlays/codecs.ts +6 -2
- package/src/clickhouse/overlays/kinds.ts +1 -1
- package/src/clickhouse/overlays/types.ts +20 -3
- package/src/clickhouse/plan/commands.ts +5 -0
- package/src/clickhouse/row-types.ts +158 -0
- package/src/clickhouse/type-syntax.ts +82 -0
- package/src/clickhouse.ts +10 -0
- package/src/codegen/clickhouse-module.ts +15 -1
- package/src/codegen/postgres-module.ts +43 -0
- package/src/composites/composites.test.ts +7 -6
- package/src/core/index.ts +4 -0
- package/src/core/typed.ts +143 -0
- package/src/generated/clickhouse.ts +1905 -6
- package/src/generated/postgres.ts +2639 -0
- package/src/lint/audit-catalog.ts +28 -0
- package/src/lint/post-synth/audit-entries.ts +7 -0
- package/src/lint/post-synth/clickhouse-catalog-checks.test.ts +315 -0
- package/src/lint/post-synth/clickhouse-type-check.ts +173 -0
- package/src/lint/post-synth/index.ts +34 -0
- package/src/lint/post-synth/postgres-audit-entries.ts +8 -0
- package/src/lint/post-synth/postgres-checks.test.ts +214 -1
- package/src/lint/post-synth/postgres-names.ts +510 -0
- package/src/lint/post-synth/sql101.ts +62 -0
- package/src/lint/post-synth/sql102.ts +34 -0
- package/src/lint/post-synth/sqlch121.ts +12 -0
- package/src/lint/post-synth/sqlch122.ts +12 -0
- package/src/lint/post-synth/sqlch123.ts +11 -0
- package/src/lint/post-synth/sqlch124.ts +21 -0
- package/src/lint/post-synth/sqlch125.ts +56 -0
- package/src/lint/post-synth/sqlch126.ts +57 -0
- package/src/lint/post-synth/sqlch127.ts +128 -0
- package/src/lint/post-synth/sqlpg119.ts +37 -0
- package/src/lint/post-synth/sqlpg120.ts +70 -0
- package/src/lint/post-synth/sqlpg121.ts +32 -0
- package/src/lint/post-synth/sqlpg122.ts +28 -0
- package/src/lint/post-synth/sqlpg123.ts +63 -0
- package/src/lint/post-synth/sqlpg124.ts +47 -0
- package/src/lint/post-synth/sqlpg125.ts +40 -0
- package/src/lint/post-synth/sqlpg126.ts +37 -0
- package/src/lint/rules/index.ts +4 -2
- package/src/lint/rules/sqlch004.ts +81 -0
- package/src/lint/rules/sqlpg005.ts +73 -0
- package/src/lint/rules/typed-names.test.ts +151 -0
- package/src/lint/rules/typed-names.ts +120 -0
- package/src/op/__snapshots__/watch-pipeline.test.ts.snap +3 -3
- package/src/postgres/entities.ts +65 -12
- package/src/postgres/import/generator.ts +7 -1
- package/src/postgres/overlays/extension-objects.ts +100 -0
- package/src/postgres/overlays/types.ts +25 -0
- package/src/postgres/row-types.ts +111 -0
- package/src/postgres.ts +10 -0
- package/src/sql-types-command.ts +99 -0
- package/src/sql-types-staleness.test.ts +110 -0
- package/src/sql-types.test.ts +132 -0
- package/src/sql-types.ts +352 -0
- package/src/typecheck.test.ts +12 -3
- package/src/typed-columns.test.ts +92 -0
|
@@ -58,10 +58,12 @@ import { type TemplateDialect } from "../core/interpolation.js";
|
|
|
58
58
|
import { SqlObject } from "../core/entity.js";
|
|
59
59
|
import type { LineageEdge } from "../core/references.js";
|
|
60
60
|
import { SqlLiteral } from "../core/template.js";
|
|
61
|
+
import { type ColumnsIn, type Named, type RowIn, type SlotsIn, type Unnamed } from "../core/typed.js";
|
|
61
62
|
export { SQL_LEXICON } from "../core/entity.js";
|
|
62
63
|
export type { LineageEdge } from "../core/references.js";
|
|
63
64
|
export { SqlLiteral, SqlTemplateError } from "../core/template.js";
|
|
64
65
|
export { quoteIdent } from "./keywords.js";
|
|
66
|
+
export type { AnyColumn, Column, ColumnTraits, KeyColumn, Named, NotNullColumn, UncheckedColumn, Unnamed } from "../core/typed.js";
|
|
65
67
|
export { POSTGRES_ENTITY_TYPES, type PostgresEntityType } from "./entity-types.js";
|
|
66
68
|
import { type PostgresEntityType } from "./entity-types.js";
|
|
67
69
|
/** A column as declared. Expressions are the source text with interpolations rendered. */
|
|
@@ -412,16 +414,28 @@ export interface PostgresSchema extends PostgresObject {
|
|
|
412
414
|
readonly entityType: "Postgres::Schema";
|
|
413
415
|
readonly props: SchemaProps;
|
|
414
416
|
}
|
|
415
|
-
/**
|
|
416
|
-
|
|
417
|
+
/**
|
|
418
|
+
* Every Postgres table and view the project declares, keyed by its qualified
|
|
419
|
+
* name (`shop.orders`). Empty here; the `sql-types.d.ts` that `chant sql
|
|
420
|
+
* types` writes augments it, and a tag given the name as its type argument
|
|
421
|
+
* reads its columns from there.
|
|
422
|
+
*/
|
|
423
|
+
export interface SqlSchema {
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* A table or a view: something with columns that SQL can reference. `N` is
|
|
427
|
+
* its qualified name when its tag was given one (`` table<"shop.orders">`...` ``):
|
|
428
|
+
* its columns are then the generated declarations' entry for that name.
|
|
429
|
+
*/
|
|
430
|
+
export interface PostgresRelation<N extends string = string> extends PostgresObject, Named<N> {
|
|
417
431
|
/** One reference per column, by its folded name: `${users.columns.email}`. */
|
|
418
|
-
readonly columns:
|
|
432
|
+
readonly columns: ColumnsIn<SqlSchema, N>;
|
|
419
433
|
}
|
|
420
|
-
export interface PostgresTable extends PostgresRelation {
|
|
434
|
+
export interface PostgresTable<N extends string = string> extends PostgresRelation<N> {
|
|
421
435
|
readonly entityType: "Postgres::Table";
|
|
422
436
|
readonly props: TableProps;
|
|
423
437
|
}
|
|
424
|
-
export interface PostgresView extends PostgresRelation {
|
|
438
|
+
export interface PostgresView<N extends string = string> extends PostgresRelation<N> {
|
|
425
439
|
readonly entityType: "Postgres::View" | "Postgres::MaterializedView";
|
|
426
440
|
readonly props: ViewProps;
|
|
427
441
|
}
|
|
@@ -469,6 +483,12 @@ export interface PostgresGrant extends PostgresObject {
|
|
|
469
483
|
readonly entityType: "Postgres::Grant" | "Postgres::DefaultPrivileges";
|
|
470
484
|
readonly props: GrantProps | DefaultPrivilegesProps;
|
|
471
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* A declared table's or view's row, for application code: `RowOf<typeof orders>`
|
|
488
|
+
* for a declaration given its name, or `RowOf<"shop.users">` by name, which
|
|
489
|
+
* also covers an object only a `.sql` file declares.
|
|
490
|
+
*/
|
|
491
|
+
export type RowOf<T extends keyof SqlSchema | Named<keyof SqlSchema & string>> = RowIn<SqlSchema, T>;
|
|
472
492
|
export declare function isPostgresObject(value: unknown): value is PostgresObject;
|
|
473
493
|
/** A column reference: an AttrRef whose parent is a Postgres table or view. */
|
|
474
494
|
export declare function isColumnRef(value: unknown): value is AttrRef;
|
|
@@ -488,12 +508,21 @@ export declare function stringValue(s: string | undefined): string | undefined;
|
|
|
488
508
|
export declare function followOnStray(tag: PostgresTag, rest: readonly StatementNode[]): StatementNode | undefined;
|
|
489
509
|
/** `` schema`CREATE SCHEMA ...` ``: one Postgres schema, parsed at build time. */
|
|
490
510
|
export declare function schema(strings: TemplateStringsArray, ...values: unknown[]): PostgresSchema;
|
|
491
|
-
/**
|
|
492
|
-
|
|
511
|
+
/**
|
|
512
|
+
* `` table`CREATE TABLE ...` ``: one Postgres table with its columns and
|
|
513
|
+
* constraints, parsed at build time. Given its qualified name as the type
|
|
514
|
+
* argument (`` table<"shop.orders">`...` ``), its columns are the ones
|
|
515
|
+
* `chant sql types` declared for that name.
|
|
516
|
+
*/
|
|
517
|
+
export declare function table<const N extends string = Unnamed>(strings: TemplateStringsArray, ...values: SlotsIn<SqlSchema, N>): PostgresTable<N>;
|
|
493
518
|
/** `` index`CREATE [UNIQUE] INDEX [CONCURRENTLY] name ON ...` ``: one named index. */
|
|
494
519
|
export declare function index(strings: TemplateStringsArray, ...values: unknown[]): PostgresIndex;
|
|
495
|
-
/**
|
|
496
|
-
|
|
520
|
+
/**
|
|
521
|
+
* `` view`CREATE [MATERIALIZED] VIEW ...` ``: one view or materialized view,
|
|
522
|
+
* with what it reads and its column lineage. Takes its qualified name as the
|
|
523
|
+
* type argument, as {@link table} does.
|
|
524
|
+
*/
|
|
525
|
+
export declare function view<const N extends string = Unnamed>(strings: TemplateStringsArray, ...values: SlotsIn<SqlSchema, N>): PostgresView<N>;
|
|
497
526
|
/** `` sequence`CREATE SEQUENCE ...` ``: one sequence. Reference it as `nextval(${seq})`. */
|
|
498
527
|
export declare function sequence(strings: TemplateStringsArray, ...values: unknown[]): PostgresSequence;
|
|
499
528
|
/** `` type`CREATE TYPE name AS ENUM (...)` ``: one enum type. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/postgres/entities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGxD,OAAO,EAAuJ,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAEnM,OAAO,EAAgG,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC3J,OAAO,EAAE,SAAS,EAA+C,MAAM,gBAAgB,CAAC;AACxF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAA0E,MAAM,kBAAkB,CAAC;AAEtH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,YA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,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAE1F;AAED,0GAA0G;AAC1G,wBAAgB,SAAS,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB,CAEhG;AAED,2IAA2I;AAC3I,wBAAgB,OAAO,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,CAE5F;AAED,gHAAgH;AAChH,wBAAgB,MAAM,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAE1F;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,CAEtF;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,aAAa,CAExF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/postgres/import/generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/postgres/import/generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAKjE,kGAAkG;AAClG,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AACD,KAAK,IAAI,GAAG,cAAc,CAAC;AAE3B,uHAAuH;AACvH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAqBD,wEAAwE;AACxE,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAO,CAAC;AAwHrE,0DAA0D;AAC1D,eAAO,MAAM,QAAQ,GAAI,MAAM,YAAY,KAAG,MAA0F,CAAC;AAEzI;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,EAAE,OAAO,GAAE,SAAS,IAAI,EAAU,GAAG;IAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;CAAE,CA6BhJ;AAaD,qBAAa,iBAAkB,YAAW,mBAAmB;IAG/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IAFpC,QAAQ,CAAC,UAAU,QAAQ;gBAEE,MAAM,CAAC,EAAE,MAAM,YAAA;IAE5C,QAAQ,CAAC,EAAE,EAAE,UAAU,GAAG,aAAa,EAAE;CAqB1C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the common extensions add, for lint: the types, functions, index
|
|
3
|
+
* access methods and operator classes a declaration may name once the project
|
|
4
|
+
* declares the extension. The pinned catalogs are read from a server with no
|
|
5
|
+
* extension installed, so none of these are in them.
|
|
6
|
+
*
|
|
7
|
+
* The list is not exhaustive. A name the core catalog does not have and no
|
|
8
|
+
* entry here covers is reported as a warning when the project declares any
|
|
9
|
+
* extension (it may come from one), and as an error when it declares none.
|
|
10
|
+
* A name an entry here covers, used without that extension declared, is an
|
|
11
|
+
* error that names the extension.
|
|
12
|
+
*
|
|
13
|
+
* Sources: the reference page of each contrib module
|
|
14
|
+
* (https://www.postgresql.org/docs/18/contrib.html), PostGIS
|
|
15
|
+
* (https://postgis.net/docs/reference.html) and pgvector
|
|
16
|
+
* (https://github.com/pgvector/pgvector#reference).
|
|
17
|
+
*/
|
|
18
|
+
export interface ExtensionObjects {
|
|
19
|
+
types?: readonly string[];
|
|
20
|
+
functions?: readonly string[];
|
|
21
|
+
/** Function name prefixes the extension owns (`st_` for PostGIS). */
|
|
22
|
+
functionPrefixes?: readonly string[];
|
|
23
|
+
accessMethods?: readonly string[];
|
|
24
|
+
/** Operator classes by access method. */
|
|
25
|
+
opclasses?: Readonly<Record<string, readonly string[]>>;
|
|
26
|
+
}
|
|
27
|
+
export declare const EXTENSION_OBJECTS: Readonly<Record<string, ExtensionObjects>>;
|
|
28
|
+
//# sourceMappingURL=extension-objects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-objects.d.ts","sourceRoot":"","sources":["../../../src/postgres/overlays/extension-objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,yCAAyC;IACzC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;CACzD;AAgBD,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAyDxE,CAAC"}
|
|
@@ -21,4 +21,14 @@ export declare const ARRAY_SUFFIX: {
|
|
|
21
21
|
readonly dimensioned: "[n]";
|
|
22
22
|
readonly keyword: "ARRAY";
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Spellings the grammar accepts that neither `pg_type` nor {@link TYPE_SPELLINGS}
|
|
26
|
+
* lists, and the canonical name each stands for (gram.y, `Numeric`,
|
|
27
|
+
* `Character`, `ConstDatetime`). Lint reads them beside the catalog so every
|
|
28
|
+
* spelling Postgres accepts resolves. `float(p)` is `real` for p up to 24 and
|
|
29
|
+
* `double precision` above; lint reads the precision.
|
|
30
|
+
*/
|
|
31
|
+
export declare const GRAMMAR_TYPE_SPELLINGS: Record<string, string>;
|
|
32
|
+
/** The serial spellings with a width suffix, beside {@link SERIAL_TYPES}. */
|
|
33
|
+
export declare const SERIAL_WIDTH_SPELLINGS: Record<string, string>;
|
|
24
34
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/postgres/overlays/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAO,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnD,6DAA6D;AAC7D,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,CAiB5E,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAWjD,CAAC;AAEF,gHAAgH;AAChH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI/C,CAAC;AAEF,yGAAyG;AACzG,eAAO,MAAM,YAAY;;;;CAAoE,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/postgres/overlays/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAO,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnD,6DAA6D;AAC7D,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,CAiB5E,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAWjD,CAAC;AAEF,gHAAgH;AAChH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI/C,CAAC;AAEF,yGAAyG;AACzG,eAAO,MAAM,YAAY;;;;CAAoE,CAAC;AAE9F;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CASzD,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIzD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a Postgres column's value is in TypeScript, for `RowOf` (#3751): the
|
|
3
|
+
* value node-postgres (`pg`, the driver the lexicon itself uses) hands back
|
|
4
|
+
* with its default type parsers. `bigint` and `numeric` are strings, since a
|
|
5
|
+
* JavaScript number cannot hold every value; `integer`, `smallint`, `real`
|
|
6
|
+
* and `double precision` are numbers; dates and timestamps are `Date`s;
|
|
7
|
+
* `json` and `jsonb` are parsed, so their shape is the application's
|
|
8
|
+
* (`unknown`); everything the driver does not parse is its text form.
|
|
9
|
+
*
|
|
10
|
+
* The table names every built-in type of every supported major's catalog
|
|
11
|
+
* (`COLUMN_TYPES`), and a test fails on one it does not, so a type a new
|
|
12
|
+
* catalog adds is a decision rather than a silent `unknown`.
|
|
13
|
+
*/
|
|
14
|
+
import type { TypeSqlName } from "../generated/postgres-types.js";
|
|
15
|
+
/** The TypeScript type of each built-in type's value, by its `format_type()` name. */
|
|
16
|
+
export declare const POSTGRES_ROW_TYPES: Readonly<Record<TypeSqlName, string>>;
|
|
17
|
+
//# sourceMappingURL=row-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-types.d.ts","sourceRoot":"","sources":["../../src/postgres/row-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAM/D,sFAAsF;AACtF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAyFpE,CAAC"}
|
|
@@ -15,8 +15,9 @@ export declare class ApprovingLedger {
|
|
|
15
15
|
private pending;
|
|
16
16
|
private resolutions;
|
|
17
17
|
port: GateLedgerPort & {
|
|
18
|
-
appended: import("@intentius/chant/
|
|
19
|
-
resolved: import("@intentius/chant/
|
|
18
|
+
appended: import("@intentius/chant/gate-decision").PendingGateRecord[];
|
|
19
|
+
resolved: import("@intentius/chant/gate-decision").GateResolutionRecord[];
|
|
20
|
+
applied: import("@intentius/chant/gate-decision").AppliedGateRecord[];
|
|
20
21
|
};
|
|
21
22
|
approveLast(): void;
|
|
22
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../../src/postgres/testing/migration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAoD,KAAK,UAAU,EAAE,KAAK,cAAc,EAAiB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE9J,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAuB,KAAK,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAEpF,gGAAgG;AAChG,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,qBAAqB,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAO/F;AAED,gFAAgF;AAChF,wBAAsB,cAAc,CAAC,MAAM,EAAE,yBAAyB,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,CAItJ;AAED,uIAAuI;AACvI,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,WAAW,CAAiB;IACpC,IAAI
|
|
1
|
+
{"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../../src/postgres/testing/migration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAoD,KAAK,UAAU,EAAE,KAAK,cAAc,EAAiB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE9J,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAuB,KAAK,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAEpF,gGAAgG;AAChG,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,qBAAqB,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAO/F;AAED,gFAAgF;AAChF,wBAAsB,cAAc,CAAC,MAAM,EAAE,yBAAyB,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,CAItJ;AAED,uIAAuI;AACvI,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,WAAW,CAAiB;IACpC,IAAI;;;;MAA0B;IAE9B,WAAW,IAAI,IAAI;CAcpB;AAED,2CAA2C;AAC3C,eAAO,MAAM,UAAU,GAAI,GAAG,WAAW,EAAE,MAAM,MAAM,KAAG,OAAyF,CAAC"}
|
package/dist/postgres.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* the statements are Postgres's own DDL, parsed at build time into entities,
|
|
6
6
|
* and the names fold and quote as Postgres folds and quotes them.
|
|
7
7
|
*/
|
|
8
|
-
export { schema, table, index, view, sequence, type, domain, extension, func, procedure, trigger, policy, role, grant, literal, SqlLiteral, SqlTemplateError, PostgresObject, POSTGRES_ENTITY_TYPES, isPostgresObject, isColumnRef, quoteIdent, type PostgresEntityType, type PostgresSchema, type PostgresRelation, type PostgresTable, type PostgresView, type PostgresIndex, type PostgresSequence, type PostgresEnum, type PostgresDomain, type PostgresExtension, type PostgresFunction, type PostgresProcedure, type PostgresTrigger, type PostgresPolicy, type PostgresRole, type PostgresGrant, type ColumnDef, type KeyDef, type CheckDef, type ForeignKeyDef, type ExclusionDef, type SchemaProps, type TableProps, type IndexProps, type ViewProps, type SequenceProps, type EnumProps, type DomainProps, type ExtensionProps, type RoutineProps, type RoutineArgDef, type FunctionProps, type ProcedureProps, type TriggerProps, type PolicyProps, type RoleProps, type GrantProps, type DefaultPrivilegesProps, type PrivilegeDef, type LineageEdge, } from "./postgres/entities.js";
|
|
8
|
+
export { schema, table, index, view, sequence, type, domain, extension, func, procedure, trigger, policy, role, grant, literal, SqlLiteral, SqlTemplateError, PostgresObject, POSTGRES_ENTITY_TYPES, isPostgresObject, isColumnRef, quoteIdent, type PostgresEntityType, type PostgresSchema, type PostgresRelation, type PostgresTable, type PostgresView, type PostgresIndex, type PostgresSequence, type PostgresEnum, type PostgresDomain, type PostgresExtension, type PostgresFunction, type PostgresProcedure, type PostgresTrigger, type PostgresPolicy, type PostgresRole, type PostgresGrant, type ColumnDef, type KeyDef, type CheckDef, type ForeignKeyDef, type ExclusionDef, type SchemaProps, type TableProps, type IndexProps, type ViewProps, type SequenceProps, type EnumProps, type DomainProps, type ExtensionProps, type RoutineProps, type RoutineArgDef, type FunctionProps, type ProcedureProps, type TriggerProps, type PolicyProps, type RoleProps, type GrantProps, type DefaultPrivilegesProps, type PrivilegeDef, type LineageEdge, type SqlSchema, type RowOf, type Column, type ColumnTraits, type AnyColumn, type UncheckedColumn, type KeyColumn, type NotNullColumn, type Named, type Unnamed, } from "./postgres/entities.js";
|
|
9
9
|
export { POSTGRES_PROVIDERS, COMMON_REFUSED, providerData, isPostgresProvider, providerAllowsExtension, isProviderOwned, refusedStatement, normalizeStatement, type PostgresProvider, type ProviderData, type ProviderSource, type RefusedStatement, type LiveObjectRef, } from "./postgres/providers/index.js";
|
|
10
10
|
export { PostgresMigrationOp, type PostgresMigrationOpConfig, type PostgresMigrationOpResources, type PostgresMigrationArgs, } from "./postgres/migrate/op.js";
|
|
11
11
|
export { POSTGRES_RECEIPTS_TABLE } from "./postgres/migrate/receipts.js";
|
package/dist/postgres.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../src/postgres.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,MAAM,EACN,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,SAAS,EACT,IAAI,EACJ,SAAS,EACT,OAAO,EACP,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../src/postgres.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,MAAM,EACN,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,SAAS,EACT,IAAI,EACJ,SAAS,EACT,OAAO,EACP,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,OAAO,GACb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,GACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,cAAc,uBAAuB,CAAC"}
|
|
@@ -26,4 +26,11 @@ export const sqlPostSynthAuditEntries: Record<string, RuleMeta> = {
|
|
|
26
26
|
SQLCH118: auditRule("SQLCH118", "merge-worthy", "guidance", "A MergeTree setting is not one the pinned server has", "Fix the setting name, or pick a setting from the pinned server's system.merge_tree_settings.", { category: "correctness" }),
|
|
27
27
|
SQLCH119: auditRule("SQLCH119", "report-only", "guidance", "An object uses a deprecated or experimental engine", "Use the engine that replaced it (Atomic for Ordinary), or accept the experimental engine knowingly.", { category: "best-practice" }),
|
|
28
28
|
SQLCH120: auditRule("SQLCH120", "report-only", "guidance", "A MergeTree engine uses the deprecated positional arguments", "Write a bare MergeTree with ORDER BY, PARTITION BY and SETTINGS.", { category: "best-practice" }),
|
|
29
|
+
SQLCH121: auditRule("SQLCH121", "merge-worthy", "guidance", "A column type names a family the pinned server does not have", "Use a type family from the pinned server's system.data_type_families, in the case it lists unless it is case-insensitive.", { category: "correctness" }),
|
|
30
|
+
SQLCH122: auditRule("SQLCH122", "merge-worthy", "guidance", "A column type's parameters do not fit its family", "Give the family the parameters it takes, each within its range.", { category: "correctness" }),
|
|
31
|
+
SQLCH123: auditRule("SQLCH123", "merge-worthy", "guidance", "A Nullable wraps a type ClickHouse does not allow inside Nullable", "Move Nullable inside (Array(Nullable(T)), LowCardinality(Nullable(T))) or drop it.", { category: "correctness" }),
|
|
32
|
+
SQLCH124: auditRule("SQLCH124", "merge-worthy", "guidance", "A table declares a column twice", "Remove or rename one of the two columns.", { category: "correctness" }),
|
|
33
|
+
SQLCH125: auditRule("SQLCH125", "merge-worthy", "guidance", "A codec parameter is outside what the codec takes", "Give the codec a parameter within its range or set, or drop the parameter for the default.", { category: "correctness" }),
|
|
34
|
+
SQLCH126: auditRule("SQLCH126", "merge-worthy", "guidance", "A GRANT column list names a column the table does not declare", "Fix the column name, or declare the column on the table.", { category: "correctness" }),
|
|
35
|
+
SQLCH127: auditRule("SQLCH127", "merge-worthy", "guidance", "An expression calls a function the pinned server does not have", "Fix the function name, use one from the pinned server's system.functions, or declare it with func.", { category: "correctness" }),
|
|
29
36
|
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checking a ClickHouse column type against the pinned catalog, for SQLCH121
|
|
3
|
+
* (the family), SQLCH122 (its parameters) and SQLCH123 (a wrapper the server
|
|
4
|
+
* refuses). One walk over the type answers all three; each check keeps the
|
|
5
|
+
* findings with its own id.
|
|
6
|
+
*
|
|
7
|
+
* Families come from `system.data_type_families` (`TYPE_FAMILIES`): a name is
|
|
8
|
+
* case-sensitive unless the catalog marks it case-insensitive, and an alias
|
|
9
|
+
* resolves to its family. Parameters come from the `TYPE_PARAMETERS` overlay.
|
|
10
|
+
* The walk goes into every parameter that is itself a type, so `UInt46`
|
|
11
|
+
* inside `Array(Map(String, UInt46))` is found.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { CLICKHOUSE_VERSION, TYPE_FAMILIES } from "../../generated/clickhouse";
|
|
15
|
+
import { TYPE_PARAMETERS, type TypeParameter } from "../../clickhouse/overlays/types";
|
|
16
|
+
import { numericParam, readType, typeTokens, type TypeParam } from "../../clickhouse/type-syntax";
|
|
17
|
+
import type { Token } from "../../clickhouse/tokens";
|
|
18
|
+
import { checkOf } from "./clickhouse-helpers";
|
|
19
|
+
import { clickhouseObjects, type OutputObject } from "./sql-helpers";
|
|
20
|
+
|
|
21
|
+
export interface TypeFinding {
|
|
22
|
+
checkId: "SQLCH121" | "SQLCH122" | "SQLCH123";
|
|
23
|
+
/** What is wrong, without the column: `UInt46 is not a type family ClickHouse 26.8.15.10 has`. */
|
|
24
|
+
detail: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type FamilySpec = { canonical: string; caseInsensitive: boolean };
|
|
28
|
+
const FAMILIES = TYPE_FAMILIES as Readonly<Record<string, FamilySpec | undefined>>;
|
|
29
|
+
const FOLDED = new Map<string, FamilySpec>();
|
|
30
|
+
const BY_LOWER = new Map<string, string>();
|
|
31
|
+
for (const [name, spec] of Object.entries(FAMILIES)) {
|
|
32
|
+
if (spec?.caseInsensitive) FOLDED.set(name.toLowerCase(), spec);
|
|
33
|
+
BY_LOWER.set(name.toLowerCase(), name);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** A family by name as the server resolves it: exactly, or in any case when the catalog marks it case-insensitive. */
|
|
37
|
+
export function familyOf(name: string): FamilySpec | undefined {
|
|
38
|
+
return FAMILIES[name] ?? FOLDED.get(name.toLowerCase());
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** The MySQL-compatible words the parser keeps after a type (`INT(11) UNSIGNED`); the server ignores them. */
|
|
42
|
+
const MODIFIERS = new Set(["UNSIGNED", "SIGNED", "AUTO_INCREMENT", "ZEROFILL"]);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* What `Nullable(...)` cannot hold. `Tuple` is not here: the pinned server
|
|
46
|
+
* takes `Nullable(Tuple(...))` when `enable_nullable_tuple_type` is on, a
|
|
47
|
+
* setting of the server's profile that the build cannot see.
|
|
48
|
+
*/
|
|
49
|
+
const NOT_INSIDE_NULLABLE: Record<string, string> = {
|
|
50
|
+
Array: "make the elements Nullable instead, Array(Nullable(T)), or drop Nullable: an empty array stands for no value",
|
|
51
|
+
Map: "make the values Nullable instead, Map(K, Nullable(V)), or drop Nullable",
|
|
52
|
+
Nested: "make the fields Nullable instead",
|
|
53
|
+
LowCardinality: "write LowCardinality(Nullable(T)) instead",
|
|
54
|
+
Variant: "drop Nullable: a Variant already holds NULL",
|
|
55
|
+
Nullable: "drop one Nullable",
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** Families whose parameters are settings or expressions rather than types and literals; left to the server. */
|
|
59
|
+
const OPAQUE = new Set(["JSON", "Dynamic"]);
|
|
60
|
+
|
|
61
|
+
/** Families whose one repeated parameter needs at least one value. */
|
|
62
|
+
const NEEDS_ONE = new Set(["Enum", "Enum8", "Enum16", "Nested", "Variant"]);
|
|
63
|
+
|
|
64
|
+
const isName = (t: Token | undefined) => t?.kind === "ident" || t?.kind === "qident";
|
|
65
|
+
|
|
66
|
+
/** Every finding for one column type, in the order the walk meets them. */
|
|
67
|
+
export function typeFindings(type: string, version: string): TypeFinding[] {
|
|
68
|
+
const tokens = typeTokens(type);
|
|
69
|
+
if (!tokens) return [];
|
|
70
|
+
const out: TypeFinding[] = [];
|
|
71
|
+
walk(tokens, version, out);
|
|
72
|
+
return out;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function walk(tokens: readonly Token[], version: string, out: TypeFinding[], named = false): string | undefined {
|
|
76
|
+
const syntax = readType(tokens);
|
|
77
|
+
if (!syntax) return undefined;
|
|
78
|
+
let words = syntax.words;
|
|
79
|
+
// A named tuple or Nested element, `a String`: the first word is the element's name.
|
|
80
|
+
if (named && words.length >= 2 && !familyOf(words.map((w) => w.text).join(" "))) {
|
|
81
|
+
const at = tokens.indexOf(words[0]!);
|
|
82
|
+
return walk(tokens.slice(at + 1), version, out);
|
|
83
|
+
}
|
|
84
|
+
if (words.some((w) => w.kind !== "ident")) return undefined;
|
|
85
|
+
// `INT UNSIGNED` is a family of its own; `Int32 UNSIGNED` is Int32 with a modifier the server ignores.
|
|
86
|
+
let spec = familyOf(words.map((w) => w.text).join(" "));
|
|
87
|
+
while (!spec && words.length > 1 && MODIFIERS.has(words[words.length - 1]!.text.toUpperCase())) {
|
|
88
|
+
words = words.slice(0, -1);
|
|
89
|
+
spec = familyOf(words.map((w) => w.text).join(" "));
|
|
90
|
+
}
|
|
91
|
+
const written = words.map((w) => w.text).join(" ");
|
|
92
|
+
if (!spec) {
|
|
93
|
+
const other = BY_LOWER.get(written.toLowerCase());
|
|
94
|
+
const hint = other ? ` (it has ${other}, and that name is case-sensitive)` : "";
|
|
95
|
+
out.push({ checkId: "SQLCH121", detail: `${written} is not a type family ClickHouse ${version} has${hint}` });
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
const family = spec.canonical;
|
|
99
|
+
if (OPAQUE.has(family)) return family;
|
|
100
|
+
const expected: readonly TypeParameter[] = TYPE_PARAMETERS[family] ?? [];
|
|
101
|
+
let params = syntax.params;
|
|
102
|
+
const say = (detail: string) => out.push({ checkId: "SQLCH122", detail });
|
|
103
|
+
|
|
104
|
+
if (params === undefined) {
|
|
105
|
+
const required = expected.filter((p) => !p.optional && !p.repeated);
|
|
106
|
+
if (required.length > 0) say(`${written} needs its ${required.map((p) => p.name).join(" and ")}`);
|
|
107
|
+
else if (NEEDS_ONE.has(family)) say(`${written} needs at least one ${expected[0]!.name}`);
|
|
108
|
+
return family;
|
|
109
|
+
}
|
|
110
|
+
// `AggregateFunction(1, uniq, UInt64)`: a leading number is the function's state version.
|
|
111
|
+
if (family === "AggregateFunction" && params[0] && numericParam(params[0]) !== undefined) params = params.slice(1);
|
|
112
|
+
|
|
113
|
+
if (expected.length === 0) {
|
|
114
|
+
if (params.length > 0) say(`${written} takes no parameters, and ${written}(${params.map((p) => p.text).join(", ")}) gives ${params.length}`);
|
|
115
|
+
return family;
|
|
116
|
+
}
|
|
117
|
+
const repeated = expected[expected.length - 1]!.repeated === true;
|
|
118
|
+
if (!repeated && params.length > expected.length) {
|
|
119
|
+
say(`${written} takes at most ${expected.length} parameter${expected.length === 1 ? "" : "s"} (${expected.map((p) => p.name).join(", ")}), and is given ${params.length}`);
|
|
120
|
+
return family;
|
|
121
|
+
}
|
|
122
|
+
const required = expected.filter((p) => !p.optional && !p.repeated).length;
|
|
123
|
+
if (params.length < required) {
|
|
124
|
+
say(`${written} needs its ${expected.slice(params.length, required).map((p) => p.name).join(" and ")}`);
|
|
125
|
+
return family;
|
|
126
|
+
}
|
|
127
|
+
if (params.length === 0 && NEEDS_ONE.has(family)) {
|
|
128
|
+
say(`${written} needs at least one ${expected[0]!.name}`);
|
|
129
|
+
return family;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
params.forEach((param, i) => {
|
|
133
|
+
const p = expected[Math.min(i, expected.length - 1)]!;
|
|
134
|
+
checkParam(written, family, p, param, version, out);
|
|
135
|
+
});
|
|
136
|
+
return family;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function checkParam(written: string, family: string, p: TypeParameter, param: TypeParam, version: string, out: TypeFinding[]): void {
|
|
140
|
+
if (p.kind === "number" && p.range) {
|
|
141
|
+
const value = numericParam(param);
|
|
142
|
+
if (value !== undefined && (value < p.range[0] || value > p.range[1])) {
|
|
143
|
+
out.push({ checkId: "SQLCH122", detail: `${written} ${p.name} ${param.text} is outside ${p.range[0]} to ${p.range[1]}` });
|
|
144
|
+
}
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (p.kind !== "type" && p.kind !== "named-type") return;
|
|
148
|
+
const inner = walk(param.tokens, version, out, p.kind === "named-type" && isName(param.tokens.find((t) => t.kind !== "ws" && t.kind !== "comment")));
|
|
149
|
+
if (family === "Nullable" && inner !== undefined && NOT_INSIDE_NULLABLE[inner]) {
|
|
150
|
+
out.push({ checkId: "SQLCH123", detail: `Nullable cannot hold ${inner}; ${NOT_INSIDE_NULLABLE[inner]}` });
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** Each declared column type in the build: tables, views that list their columns, and dictionary attributes. */
|
|
155
|
+
export function* columnTypes(objects: readonly OutputObject[]): Generator<{ object: OutputObject; column: string; type: string }> {
|
|
156
|
+
for (const o of objects) {
|
|
157
|
+
if (!/^ClickHouse::(Table|View|MaterializedView|Dictionary)$/.test(o.type)) continue;
|
|
158
|
+
const columns = (o.columns ?? []) as Array<{ name: string; type?: string }>;
|
|
159
|
+
for (const c of columns) if (c.type) yield { object: o, column: c.name, type: c.type };
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** The body of one of the three type checks: every column type's findings with that id. */
|
|
164
|
+
export function reportTypeFindings(id: TypeFinding["checkId"]): Parameters<typeof checkOf>[1] {
|
|
165
|
+
return (ctx, report) => {
|
|
166
|
+
for (const { object, column, type } of columnTypes(clickhouseObjects(ctx))) {
|
|
167
|
+
for (const f of typeFindings(type, CLICKHOUSE_VERSION)) {
|
|
168
|
+
if (f.checkId !== id) continue;
|
|
169
|
+
report({ severity: "error", message: `${object.export} (${object.name}): column ${column} ${type}: ${f.detail}`, entity: object.export });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
}
|
|
@@ -26,4 +26,12 @@ export const postgresPostSynthAuditEntries: Record<string, RuleMeta> = {
|
|
|
26
26
|
SQLPG116: auditRule("SQLPG116", "merge-worthy", "guidance", "An extension the target major no longer ships", "Remove the extension, or set sql.postgresMajor to an older major.", { category: "best-practice" }),
|
|
27
27
|
SQLPG117: auditRule("SQLPG117", "report-only", "guidance", "A view without security_invoker runs with its owner's privileges", "Set security_invoker = true in the view's WITH options.", { category: "security" }),
|
|
28
28
|
SQLPG118: auditRule("SQLPG118", "report-only", "guidance", "A table uses INHERITS where declarative partitioning replaced it", "Use PARTITION BY and PARTITION OF.", { category: "best-practice" }),
|
|
29
|
+
SQLPG119: auditRule("SQLPG119", "merge-worthy", "guidance", "A column, domain or sequence type the target major does not have", "Fix the type name, declare the type, or declare the extension that provides it.", { category: "correctness" }),
|
|
30
|
+
SQLPG120: auditRule("SQLPG120", "merge-worthy", "guidance", "A type modifier that does not fit the type", "Drop the modifier, or bring it into the type's range.", { category: "correctness" }),
|
|
31
|
+
SQLPG121: auditRule("SQLPG121", "merge-worthy", "guidance", "An identity column whose type is not smallint, integer or bigint", "Declare the identity column smallint, integer or bigint.", { category: "correctness" }),
|
|
32
|
+
SQLPG122: auditRule("SQLPG122", "merge-worthy", "guidance", "A table declares a column twice, or an enum lists a label twice", "Remove or rename the repeated column or label.", { category: "correctness" }),
|
|
33
|
+
SQLPG123: auditRule("SQLPG123", "merge-worthy", "guidance", "A key, index or grant column list names a column the table does not declare", "Fix the column name, or write it as ${table.columns.name}.", { category: "correctness" }),
|
|
34
|
+
SQLPG124: auditRule("SQLPG124", "merge-worthy", "guidance", "A foreign key names a column the referenced table lacks, or one of another type category", "Reference a declared column, and give the referencing column a type of the same category.", { category: "correctness" }),
|
|
35
|
+
SQLPG125: auditRule("SQLPG125", "merge-worthy", "guidance", "An index access method or operator class the target major does not have, or not for that method", "Use a method and operator class the target major has, or declare the extension that provides them.", { category: "correctness" }),
|
|
36
|
+
SQLPG126: auditRule("SQLPG126", "merge-worthy", "guidance", "An expression calls a function the target major does not have", "Fix the function name, declare the function, or declare the extension that provides it.", { category: "correctness" }),
|
|
29
37
|
};
|