@memberjunction/sql-dialect 6.2.0-edge.6 → 6.2.0-edge.7
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 +280 -91
- package/dist/dialectFactory.d.ts +34 -14
- package/dist/dialectFactory.d.ts.map +1 -1
- package/dist/dialectFactory.js +101 -25
- package/dist/dialectFactory.js.map +1 -1
- package/dist/dialects/ansi.d.ts +55 -0
- package/dist/dialects/ansi.d.ts.map +1 -0
- package/dist/dialects/ansi.js +136 -0
- package/dist/dialects/ansi.js.map +1 -0
- package/dist/dialects/baseSchemaDDL.d.ts +78 -0
- package/dist/dialects/baseSchemaDDL.d.ts.map +1 -0
- package/dist/dialects/baseSchemaDDL.js +63 -0
- package/dist/dialects/baseSchemaDDL.js.map +1 -0
- package/dist/dialects/databricksQueryDialect.d.ts +41 -0
- package/dist/dialects/databricksQueryDialect.d.ts.map +1 -0
- package/dist/dialects/databricksQueryDialect.js +103 -0
- package/dist/dialects/databricksQueryDialect.js.map +1 -0
- package/dist/dialects/mysqlQueryDialect.d.ts +46 -0
- package/dist/dialects/mysqlQueryDialect.d.ts.map +1 -0
- package/dist/dialects/mysqlQueryDialect.js +117 -0
- package/dist/dialects/mysqlQueryDialect.js.map +1 -0
- package/dist/dialects/oracleQueryDialect.d.ts +42 -0
- package/dist/dialects/oracleQueryDialect.d.ts.map +1 -0
- package/dist/dialects/oracleQueryDialect.js +92 -0
- package/dist/dialects/oracleQueryDialect.js.map +1 -0
- package/dist/dialects/postgresqlSchemaDDL.d.ts +112 -0
- package/dist/dialects/postgresqlSchemaDDL.d.ts.map +1 -0
- package/dist/dialects/postgresqlSchemaDDL.js +590 -0
- package/dist/dialects/postgresqlSchemaDDL.js.map +1 -0
- package/dist/dialects/snowflakeQueryDialect.d.ts +41 -0
- package/dist/dialects/snowflakeQueryDialect.d.ts.map +1 -0
- package/dist/dialects/snowflakeQueryDialect.js +94 -0
- package/dist/dialects/snowflakeQueryDialect.js.map +1 -0
- package/dist/dialects/sqlServerSchemaDDL.d.ts +83 -0
- package/dist/dialects/sqlServerSchemaDDL.d.ts.map +1 -0
- package/dist/dialects/sqlServerSchemaDDL.js +507 -0
- package/dist/dialects/sqlServerSchemaDDL.js.map +1 -0
- package/dist/facets/dialectBinding.d.ts +26 -0
- package/dist/facets/dialectBinding.d.ts.map +1 -0
- package/dist/facets/dialectBinding.js +2 -0
- package/dist/facets/dialectBinding.js.map +1 -0
- package/dist/facets/dialectGrammar.d.ts +82 -0
- package/dist/facets/dialectGrammar.d.ts.map +1 -0
- package/dist/facets/dialectGrammar.js +2 -0
- package/dist/facets/dialectGrammar.js.map +1 -0
- package/dist/facets/dialectKey.d.ts +9 -0
- package/dist/facets/dialectKey.d.ts.map +1 -0
- package/dist/facets/dialectKey.js +2 -0
- package/dist/facets/dialectKey.js.map +1 -0
- package/dist/facets/dialectLexicalRules.d.ts +102 -0
- package/dist/facets/dialectLexicalRules.d.ts.map +1 -0
- package/dist/facets/dialectLexicalRules.js +2 -0
- package/dist/facets/dialectLexicalRules.js.map +1 -0
- package/dist/facets/dialectSchemaDDL.d.ts +213 -0
- package/dist/facets/dialectSchemaDDL.d.ts.map +1 -0
- package/dist/facets/dialectSchemaDDL.js +2 -0
- package/dist/facets/dialectSchemaDDL.js.map +1 -0
- package/dist/facets/dialectTypes.d.ts +31 -0
- package/dist/facets/dialectTypes.d.ts.map +1 -0
- package/dist/facets/dialectTypes.js +2 -0
- package/dist/facets/dialectTypes.js.map +1 -0
- package/dist/facets/dialectWriter.d.ts +59 -0
- package/dist/facets/dialectWriter.d.ts.map +1 -0
- package/dist/facets/dialectWriter.js +2 -0
- package/dist/facets/dialectWriter.js.map +1 -0
- package/dist/index.d.ts +21 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/postgresqlDialect.d.ts +57 -152
- package/dist/postgresqlDialect.d.ts.map +1 -1
- package/dist/postgresqlDialect.js +110 -683
- package/dist/postgresqlDialect.js.map +1 -1
- package/dist/queryDialect.d.ts +42 -0
- package/dist/queryDialect.d.ts.map +1 -0
- package/dist/queryDialect.js +25 -0
- package/dist/queryDialect.js.map +1 -0
- package/dist/sqlDialect.d.ts +121 -212
- package/dist/sqlDialect.d.ts.map +1 -1
- package/dist/sqlDialect.js +710 -29
- package/dist/sqlDialect.js.map +1 -1
- package/dist/sqlServerDialect.d.ts +54 -120
- package/dist/sqlServerDialect.d.ts.map +1 -1
- package/dist/sqlServerDialect.js +124 -594
- package/dist/sqlServerDialect.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectGrammar.d.ts","sourceRoot":"","sources":["../../src/facets/dialectGrammar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,cAAc,GAAG,cAAc,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,wFAAwF;IACxF,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,uFAAuF;IACvF,QAAQ,CAAC,2BAA2B,EAAE,OAAO,CAAC;IAC9C,wEAAwE;IACxE,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,gHAAgH;IAChH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,sHAAsH;IACtH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,oHAAoH;IACpH,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,4GAA4G;IAC5G,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,qDAAqD;IACrD,QAAQ,CAAC,cAAc,EAAE,kBAAkB,CAAC;IAC5C,oGAAoG;IACpG,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,2BAA2B,EAAE,SAAS,MAAM,EAAE,CAAC;IACxD;;;;;OAKG;IACH,QAAQ,CAAC,4BAA4B,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1D,kEAAkE;IAClE,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChD,6DAA6D;IAC7D,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAC;IACxC,+FAA+F;IAC/F,QAAQ,CAAC,qBAAqB,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAC5D;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectGrammar.js","sourceRoot":"","sources":["../../src/facets/dialectGrammar.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The key a SQL dialect is registered and looked up under.
|
|
3
|
+
*
|
|
4
|
+
* Open on purpose: the named keys are the dialects this package ships, and any other string is a
|
|
5
|
+
* dialect a consumer registered itself. Keys are lower case by convention. This is wider than
|
|
6
|
+
* `DatabasePlatform`, which names only the platforms MJ itself runs on.
|
|
7
|
+
*/
|
|
8
|
+
export type DialectKey = 'sqlserver' | 'postgresql' | 'mysql' | 'oracle' | 'snowflake' | 'databricks' | (string & Record<never, never>);
|
|
9
|
+
//# sourceMappingURL=dialectKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectKey.d.ts","sourceRoot":"","sources":["../../src/facets/dialectKey.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAChB,WAAW,GACX,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,WAAW,GACX,YAAY,GACZ,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectKey.js","sourceRoot":"","sources":["../../src/facets/dialectKey.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One way a dialect quotes an identifier, such as `"name"`, `[name]` or `` `name` ``.
|
|
3
|
+
*/
|
|
4
|
+
export interface IdentifierQuoteForm {
|
|
5
|
+
/** The character that opens the quoted identifier. */
|
|
6
|
+
readonly Open: string;
|
|
7
|
+
/** The character that closes it. */
|
|
8
|
+
readonly Close: string;
|
|
9
|
+
/** Whether a doubled closing character inside the identifier stands for one literal closing character. */
|
|
10
|
+
readonly DoubledCloseEscape: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One form of string literal: a quote character, the prefixes that may introduce it, and the
|
|
14
|
+
* escapes recognized inside it.
|
|
15
|
+
*/
|
|
16
|
+
export interface StringLiteralForm {
|
|
17
|
+
/**
|
|
18
|
+
* The prefixes that open this form, matched ignoring case. `''` is the bare form (no prefix);
|
|
19
|
+
* `'N'` is a national-character literal, `'E'` a PostgreSQL escape string, `'R'` a raw string.
|
|
20
|
+
*/
|
|
21
|
+
readonly Prefixes: readonly string[];
|
|
22
|
+
/** The quote character that opens and closes the literal. */
|
|
23
|
+
readonly Quote: string;
|
|
24
|
+
/** Whether a doubled quote character inside the literal stands for one literal quote. */
|
|
25
|
+
readonly DoubledQuoteEscape: boolean;
|
|
26
|
+
/** Whether a backslash makes the next character literal. */
|
|
27
|
+
readonly BackslashEscape: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Dollar-quoted string literals: `'none'`, `'untagged'` (`$$…$$` only) or `'tagged'`
|
|
31
|
+
* (`$$…$$` and `$tag$…$tag$`).
|
|
32
|
+
*/
|
|
33
|
+
export type DollarQuoting = 'none' | 'untagged' | 'tagged';
|
|
34
|
+
/** A line comment opener, such as `--`, `#` or `//`. A line comment ends at a CR or an LF. */
|
|
35
|
+
export interface LineCommentForm {
|
|
36
|
+
/** The characters that open the comment. */
|
|
37
|
+
readonly Opener: string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the opener starts a comment only when a whitespace or control character (or the end
|
|
40
|
+
* of the text) follows it. MySQL's `--` works this way, so `1--1` is `1 - (-1)` there.
|
|
41
|
+
*/
|
|
42
|
+
readonly RequiresWhitespaceAfter: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** How `/* … *\/` block comments behave. */
|
|
45
|
+
export interface BlockCommentRules {
|
|
46
|
+
/** Whether a `/*` inside a block comment opens a nested comment that needs its own `*\/`. */
|
|
47
|
+
readonly Nested: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Openers of block comments whose content the database runs or interprets as SQL, such as
|
|
50
|
+
* MySQL's `/*!` (executed by MySQL) and `/*+` (optimizer hints). Empty when there are none.
|
|
51
|
+
*/
|
|
52
|
+
readonly ExecutableOpeners: readonly string[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The parameter placeholder token forms a dialect's drivers accept:
|
|
56
|
+
* `'at-name'` (`@name`), `'question'` (`?`), `'dollar-number'` (`$1`), `'colon-name'` (`:name`),
|
|
57
|
+
* `'colon-number'` (`:1`).
|
|
58
|
+
*/
|
|
59
|
+
export type ParameterPlaceholderForm = 'at-name' | 'question' | 'dollar-number' | 'colon-name' | 'colon-number';
|
|
60
|
+
/**
|
|
61
|
+
* What a dialect does to an unquoted identifier: `'upper'` folds it to upper case (the SQL
|
|
62
|
+
* standard, Oracle, Snowflake), `'lower'` to lower case (PostgreSQL), and `'none'` keeps it as
|
|
63
|
+
* written and compares it according to the server's collation or settings (SQL Server, MySQL,
|
|
64
|
+
* Databricks).
|
|
65
|
+
*/
|
|
66
|
+
export type IdentifierCaseFolding = 'upper' | 'lower' | 'none';
|
|
67
|
+
/**
|
|
68
|
+
* The lexical rules of a dialect: how its text splits into tokens. These decide where string
|
|
69
|
+
* literals, quoted identifiers and comments begin and end, which is what every safe scan of SQL
|
|
70
|
+
* text (stacked statements, comment markers, keyword searches) depends on.
|
|
71
|
+
*/
|
|
72
|
+
export interface DialectLexicalRules {
|
|
73
|
+
/** Identifier quoting forms, in the order they are tried. */
|
|
74
|
+
readonly IdentifierQuotes: readonly IdentifierQuoteForm[];
|
|
75
|
+
/** String literal forms, in the order they are tried. */
|
|
76
|
+
readonly StringLiterals: readonly StringLiteralForm[];
|
|
77
|
+
/**
|
|
78
|
+
* Whether a server or session setting can turn backslash escapes in string literals on or off
|
|
79
|
+
* (MySQL's `NO_BACKSLASH_ESCAPES` SQL mode, Spark's `spark.sql.parser.escapedStringLiterals`).
|
|
80
|
+
* When true, text reading a string literal that contains a backslash cannot know where the
|
|
81
|
+
* literal ends, so a screen should refuse it.
|
|
82
|
+
*/
|
|
83
|
+
readonly BackslashEscapesDependOnServerSettings: boolean;
|
|
84
|
+
/** Dollar-quoted string literals. */
|
|
85
|
+
readonly DollarQuotedStrings: DollarQuoting;
|
|
86
|
+
/**
|
|
87
|
+
* Prefixes of Oracle-style alternative quoting (`q'[…]'`, `nq'{…}'`), matched ignoring case.
|
|
88
|
+
* The character after the quote is the delimiter: `[`, `{`, `<` and `(` close with their
|
|
89
|
+
* partner, any other character closes with itself, always followed by a quote. Empty when the
|
|
90
|
+
* dialect has no alternative quoting.
|
|
91
|
+
*/
|
|
92
|
+
readonly AlternativeQuotingPrefixes: readonly string[];
|
|
93
|
+
/** Line comment openers. */
|
|
94
|
+
readonly LineComments: readonly LineCommentForm[];
|
|
95
|
+
/** Block comment behaviour. */
|
|
96
|
+
readonly BlockComments: BlockCommentRules;
|
|
97
|
+
/** Parameter placeholder forms. */
|
|
98
|
+
readonly ParameterPlaceholders: readonly ParameterPlaceholderForm[];
|
|
99
|
+
/** What happens to an unquoted identifier's case. */
|
|
100
|
+
readonly UnquotedIdentifierCase: IdentifierCaseFolding;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=dialectLexicalRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectLexicalRules.d.ts","sourceRoot":"","sources":["../../src/facets/dialectLexicalRules.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0GAA0G;IAC1G,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,4DAA4D;IAC5D,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE3D,8FAA8F;AAC9F,MAAM,WAAW,eAAe;IAC5B,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;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,213 @@
|
|
|
1
|
+
import type { DataTypeMap } from '../dataTypeMap.js';
|
|
2
|
+
/**
|
|
3
|
+
* Abstract field type used by SchemaEngine to describe columns
|
|
4
|
+
* in a platform-agnostic way before DDL generation.
|
|
5
|
+
*/
|
|
6
|
+
export type SchemaFieldType = 'string' | 'text' | 'integer' | 'bigint' | 'decimal' | 'boolean' | 'datetime' | 'date' | 'uuid' | 'json' | 'float' | 'time';
|
|
7
|
+
/**
|
|
8
|
+
* Options for resolving an abstract schema type to a concrete SQL type.
|
|
9
|
+
*/
|
|
10
|
+
export interface ResolveTypeOptions {
|
|
11
|
+
/** Abstract type (e.g., 'string', 'integer', 'boolean'). */
|
|
12
|
+
type: SchemaFieldType;
|
|
13
|
+
/** Max length for string types. */
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
/** Precision for decimal types. */
|
|
16
|
+
precision?: number;
|
|
17
|
+
/** Scale for decimal types. */
|
|
18
|
+
scale?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Schema introspection queries for a given database platform.
|
|
22
|
+
* Each dialect provides platform-specific catalog queries.
|
|
23
|
+
*/
|
|
24
|
+
export interface SchemaIntrospectionSQL {
|
|
25
|
+
/** Query that returns all user tables in a schema */
|
|
26
|
+
listTables: string;
|
|
27
|
+
/** Query that returns all columns for a given table */
|
|
28
|
+
listColumns: string;
|
|
29
|
+
/** Query that returns constraints (PK, UNIQUE, CHECK) */
|
|
30
|
+
listConstraints: string;
|
|
31
|
+
/** Query that returns foreign key relationships */
|
|
32
|
+
listForeignKeys: string;
|
|
33
|
+
/** Query that returns indexes */
|
|
34
|
+
listIndexes: string;
|
|
35
|
+
/** Template for checking if a database object exists */
|
|
36
|
+
objectExists: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Options for generating a column definition in DDL.
|
|
40
|
+
*/
|
|
41
|
+
export interface ColumnDDLOptions {
|
|
42
|
+
/** Column name (unquoted — the dialect will quote it). */
|
|
43
|
+
name: string;
|
|
44
|
+
/** Full SQL type string (e.g., "NVARCHAR(255)", "INTEGER", "TIMESTAMPTZ"). */
|
|
45
|
+
sqlType: string;
|
|
46
|
+
/** Whether the column allows NULL values. */
|
|
47
|
+
nullable: boolean;
|
|
48
|
+
/** Optional default value expression (e.g., "'Active'", "GETUTCDATE()"). */
|
|
49
|
+
defaultValue?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Options for ALTER TABLE column modification.
|
|
53
|
+
*/
|
|
54
|
+
export interface AlterColumnOptions {
|
|
55
|
+
/** Column name (unquoted). */
|
|
56
|
+
columnName: string;
|
|
57
|
+
/** New SQL type string. */
|
|
58
|
+
newType: string;
|
|
59
|
+
/** New nullability. */
|
|
60
|
+
newNullable: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Options for generating trigger DDL.
|
|
64
|
+
*/
|
|
65
|
+
export interface TriggerOptions {
|
|
66
|
+
/** Schema name */
|
|
67
|
+
schema: string;
|
|
68
|
+
/** Table name the trigger is on */
|
|
69
|
+
tableName: string;
|
|
70
|
+
/** Trigger name */
|
|
71
|
+
triggerName: string;
|
|
72
|
+
/** Timing: BEFORE, AFTER, or INSTEAD OF */
|
|
73
|
+
timing: 'BEFORE' | 'AFTER' | 'INSTEAD OF';
|
|
74
|
+
/** Events that fire the trigger */
|
|
75
|
+
events: ('INSERT' | 'UPDATE' | 'DELETE')[];
|
|
76
|
+
/** The trigger body SQL */
|
|
77
|
+
body: string;
|
|
78
|
+
/** For PostgreSQL: name of the trigger function */
|
|
79
|
+
functionName?: string;
|
|
80
|
+
/** Whether the trigger fires FOR EACH ROW or FOR EACH STATEMENT */
|
|
81
|
+
forEach?: 'ROW' | 'STATEMENT';
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Options for generating index DDL.
|
|
85
|
+
*/
|
|
86
|
+
export interface IndexOptions {
|
|
87
|
+
/** Schema name */
|
|
88
|
+
schema: string;
|
|
89
|
+
/** Table name */
|
|
90
|
+
tableName: string;
|
|
91
|
+
/** Index name */
|
|
92
|
+
indexName: string;
|
|
93
|
+
/** Columns to index */
|
|
94
|
+
columns: string[];
|
|
95
|
+
/** Whether this is a unique index */
|
|
96
|
+
unique?: boolean;
|
|
97
|
+
/** Index method (btree, gin, gist, hash — PostgreSQL specific, ignored for SQL Server) */
|
|
98
|
+
method?: string;
|
|
99
|
+
/** WHERE clause for partial indexes (PostgreSQL only) */
|
|
100
|
+
where?: string;
|
|
101
|
+
/** INCLUDE columns (SQL Server covering index) */
|
|
102
|
+
includeColumns?: string[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Everything a dialect needs to run MJ itself on the database: DDL, stored-procedure syntax,
|
|
106
|
+
* migration and batch control, schema introspection, transactions and the platform functions
|
|
107
|
+
* CodeGen emits. Only a full {@link SQLDialect} has one; a query-only dialect does not.
|
|
108
|
+
*/
|
|
109
|
+
export interface DialectSchemaDDL {
|
|
110
|
+
/** Canonicalizes a schema name to the form the platform stores when it appears unquoted in DDL. */
|
|
111
|
+
CanonicalSchemaName(name: string): string;
|
|
112
|
+
/** The SQL type token for a boolean stored-procedure or function parameter. */
|
|
113
|
+
BooleanParameterType(): string;
|
|
114
|
+
/** The parameter-reference syntax of stored-procedure / function bodies. */
|
|
115
|
+
ParameterRef(name: string): string;
|
|
116
|
+
/** The default-value clause appended to a parameter declaration. */
|
|
117
|
+
ParameterDefault(value: string): string;
|
|
118
|
+
/** A new UUID generation expression. */
|
|
119
|
+
NewUUID(): string;
|
|
120
|
+
/** A CAST-to-UUID expression. */
|
|
121
|
+
CastToUUID(expr: string): string;
|
|
122
|
+
/** The empty-GUID sentinel literal, formatted for a CASE comparison. */
|
|
123
|
+
EmptyUUIDLiteral(): string;
|
|
124
|
+
/** A CAST to a bounded-width string type. */
|
|
125
|
+
CastToBoundedString(expr: string, maxLength?: number): string;
|
|
126
|
+
/** A string-split row source expression. */
|
|
127
|
+
StringSplitFunction(value: string, delimiter: string): string;
|
|
128
|
+
/** A full-text search predicate. */
|
|
129
|
+
FullTextSearchPredicate(column: string, searchTerm: string): string;
|
|
130
|
+
/** Wraps one DML statement so its affected-row count comes back as a one-row result set. */
|
|
131
|
+
AffectedRowCountSQL(dmlStatement: string, alias: string): string;
|
|
132
|
+
/** The data type mapping from SQL Server types to this platform's. */
|
|
133
|
+
readonly TypeMap: DataTypeMap;
|
|
134
|
+
/** Maximum string length usable in an index key column. */
|
|
135
|
+
readonly MaxKeyStringLength: number;
|
|
136
|
+
/** Maximum in-row bytes per row, or `null` when there is no limit. */
|
|
137
|
+
readonly MaxInRowSizeBytes: number | null;
|
|
138
|
+
/** Maximum columns per table, or `null` when effectively unbounded. */
|
|
139
|
+
readonly MaxColumnCount: number | null;
|
|
140
|
+
/** Minimum in-row byte footprint of a column of the given raw SQL type. */
|
|
141
|
+
EstimateInRowBytes(rawSqlType: string): number;
|
|
142
|
+
/** The clause that returns inserted values. */
|
|
143
|
+
ReturnInsertedClause(columns?: string[]): string;
|
|
144
|
+
/** The auto-increment primary-key expression for DDL. */
|
|
145
|
+
AutoIncrementPKExpression(): string;
|
|
146
|
+
/** The default expression for a UUID primary key. */
|
|
147
|
+
UUIDPKDefault(): string;
|
|
148
|
+
/** The expression returning the last inserted identity value. */
|
|
149
|
+
ScopeIdentityExpression(): string;
|
|
150
|
+
/** The row count variable or expression for the last statement. */
|
|
151
|
+
RowCountExpression(): string;
|
|
152
|
+
/** The batch separator. */
|
|
153
|
+
BatchSeparator(): string;
|
|
154
|
+
/** Splits an oversized batch into statements on `;` + end-of-line boundaries. */
|
|
155
|
+
SplitStatements(batch: string): string[];
|
|
156
|
+
/** SQL that checks whether a database object exists. */
|
|
157
|
+
ExistenceCheckSQL(objectType: string, schema: string, name: string): string;
|
|
158
|
+
/** Whether the platform supports CREATE OR REPLACE for the object type. */
|
|
159
|
+
CreateOrReplaceSupported(objectType: string): boolean;
|
|
160
|
+
/** DDL that creates a full-text index. */
|
|
161
|
+
FullTextIndexDDL(table: string, columns: string[], catalog?: string): string;
|
|
162
|
+
/** Splits `${...}` inside SQL string literals so Flyway does not treat it as a placeholder. */
|
|
163
|
+
EscapeFlywayStringInterpolation(sql: string): string;
|
|
164
|
+
/** The syntax for calling a stored procedure or function. */
|
|
165
|
+
ProcedureCallSyntax(schema: string, name: string, params: string[]): string;
|
|
166
|
+
/** CREATE SCHEMA IF NOT EXISTS. */
|
|
167
|
+
CreateSchemaDDL(schemaName: string): string;
|
|
168
|
+
/** Caps a column type that cannot be used in a UNIQUE or index constraint. */
|
|
169
|
+
CapIndexableType(rawSqlType: string): string;
|
|
170
|
+
/** The ADD COLUMN clause for ALTER TABLE. */
|
|
171
|
+
AddColumnClause(col: ColumnDDLOptions): string;
|
|
172
|
+
/** ALTER COLUMN clause(s) for type and nullability changes. */
|
|
173
|
+
AlterColumnDDL(quotedTable: string, options: AlterColumnOptions): string;
|
|
174
|
+
/** Description metadata SQL for a column. */
|
|
175
|
+
CommentOnColumn(schema: string, table: string, column: string, comment: string): string;
|
|
176
|
+
/** The fallback type for unknown abstract types. */
|
|
177
|
+
FallbackType(): string;
|
|
178
|
+
/** Resolves an abstract schema field type to a concrete SQL type. */
|
|
179
|
+
ResolveAbstractType(options: ResolveTypeOptions): string;
|
|
180
|
+
/** A CREATE TABLE wrapped in a create-if-not-exists guard. */
|
|
181
|
+
CreateTableIfNotExistsDDL(schema: string, tableName: string, columnsDDL: string): string;
|
|
182
|
+
/** A conditional IF/ELSE block in procedural SQL. */
|
|
183
|
+
ConditionalBlock(condition: string, thenSQL: string, elseSQL?: string): string;
|
|
184
|
+
/** A non-fatal signal statement detectable in CLI output. */
|
|
185
|
+
RaiseSignalSQL(message: string): string;
|
|
186
|
+
/** Trigger DDL. */
|
|
187
|
+
TriggerDDL(options: TriggerOptions): string;
|
|
188
|
+
/** Index DDL. */
|
|
189
|
+
IndexDDL(options: IndexOptions): string;
|
|
190
|
+
/** A GRANT statement. */
|
|
191
|
+
GrantPermission(permission: string, objectType: string, schema: string, object: string, role: string): string;
|
|
192
|
+
/** A description (comment) statement for an object. */
|
|
193
|
+
CommentOnObject(objectType: string, schema: string, name: string, comment: string): string;
|
|
194
|
+
/** A single-statement CREATE TABLE that runs only when the table is absent. */
|
|
195
|
+
CreateTableIfAbsent(fullTable: string, columnsBody: string): string;
|
|
196
|
+
/** {@link CommentOnObject} that is safe to re-run. */
|
|
197
|
+
CommentOnObjectIfAbsent(objectType: string, schema: string, name: string, comment: string): string;
|
|
198
|
+
/** {@link CommentOnColumn} that is safe to re-run. */
|
|
199
|
+
CommentOnColumnIfAbsent(schema: string, table: string, column: string, comment: string): string;
|
|
200
|
+
/** Schema introspection queries. */
|
|
201
|
+
SchemaIntrospectionQueries(): SchemaIntrospectionSQL;
|
|
202
|
+
/** A ready-to-run query enumerating one schema's foreign-key graph. */
|
|
203
|
+
ForeignKeyGraphSQL(schema: string): string;
|
|
204
|
+
/** Wraps statements in one all-or-nothing transaction batch. */
|
|
205
|
+
AtomicBatchScript(statements: string[]): string;
|
|
206
|
+
/** SQL that marks a savepoint. */
|
|
207
|
+
CreateSavepointSQL(name: string): string;
|
|
208
|
+
/** SQL that releases a savepoint, or `null` when the platform has none. */
|
|
209
|
+
ReleaseSavepointSQL(name: string): string | null;
|
|
210
|
+
/** SQL that rolls back to a savepoint. */
|
|
211
|
+
RollbackToSavepointSQL(name: string): string;
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=dialectSchemaDDL.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectSchemaDDL.d.ts","sourceRoot":"","sources":["../../src/facets/dialectSchemaDDL.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,eAAe,GACrB,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GACpD,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM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C,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectSchemaDDL.js","sourceRoot":"","sources":["../../src/facets/dialectSchemaDDL.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The SQL type names a dialect uses for each conceptual category, lower case and trimmed, as the
|
|
3
|
+
* database's catalog reports them. A frozen plain object.
|
|
4
|
+
*/
|
|
5
|
+
export interface DialectTypes {
|
|
6
|
+
/** Boolean column types. */
|
|
7
|
+
readonly BooleanTypeNames: readonly string[];
|
|
8
|
+
/** Variable-length character and text types. */
|
|
9
|
+
readonly StringTypeNames: readonly string[];
|
|
10
|
+
/** The subset of {@link StringTypeNames} that pads stored values with spaces to the declared length. */
|
|
11
|
+
readonly FixedWidthStringTypeNames: readonly string[];
|
|
12
|
+
/** Date, time and timestamp types. */
|
|
13
|
+
readonly DateTypeNames: readonly string[];
|
|
14
|
+
/** Integer types. */
|
|
15
|
+
readonly IntegerTypeNames: readonly string[];
|
|
16
|
+
/** Floating-point and decimal types. */
|
|
17
|
+
readonly FloatTypeNames: readonly string[];
|
|
18
|
+
/** UUID types. */
|
|
19
|
+
readonly UuidTypeNames: readonly string[];
|
|
20
|
+
/** Binary types. */
|
|
21
|
+
readonly BinaryTypeNames: readonly string[];
|
|
22
|
+
/** JSON and XML types. */
|
|
23
|
+
readonly JsonTypeNames: readonly string[];
|
|
24
|
+
/** Fixed-precision currency types. */
|
|
25
|
+
readonly CurrencyTypeNames: readonly string[];
|
|
26
|
+
/** Interval and duration types. */
|
|
27
|
+
readonly IntervalTypeNames: readonly string[];
|
|
28
|
+
/** Network address types. */
|
|
29
|
+
readonly NetworkTypeNames: readonly string[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=dialectTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectTypes.d.ts","sourceRoot":"","sources":["../../src/facets/dialectTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,4BAA4B;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,gDAAgD;IAChD,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,wGAAwG;IACxG,QAAQ,CAAC,yBAAyB,EAAE,SAAS,MAAM,EAAE,CAAC;IACtD,sCAAsC;IACtC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,qBAAqB;IACrB,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,wCAAwC;IACxC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,kBAAkB;IAClB,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,oBAAoB;IACpB,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,0BAA0B;IAC1B,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,sCAAsC;IACtC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,mCAAmC;IACnC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,6BAA6B;IAC7B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectTypes.js","sourceRoot":"","sources":["../../src/facets/dialectTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result from a limit clause: some platforms cap rows with a prefix (`TOP n`), others with a
|
|
3
|
+
* suffix (`LIMIT n OFFSET m`, `OFFSET m ROWS FETCH NEXT n ROWS ONLY`).
|
|
4
|
+
*/
|
|
5
|
+
export interface LimitClauseResult {
|
|
6
|
+
/** SQL placed between SELECT and the column list (e.g., "TOP 10") */
|
|
7
|
+
prefix: string;
|
|
8
|
+
/** SQL placed after the ORDER BY / WHERE clause (e.g., "LIMIT 10 OFFSET 20") */
|
|
9
|
+
suffix: string;
|
|
10
|
+
}
|
|
11
|
+
/** Time units {@link DialectWriter.DateAddExpression} accepts. */
|
|
12
|
+
export type DateAddUnit = 'MINUTE' | 'HOUR' | 'DAY';
|
|
13
|
+
/**
|
|
14
|
+
* Writes SQL fragments in a dialect's syntax: quoting, literals, row caps and the common
|
|
15
|
+
* expressions whose spelling differs between databases.
|
|
16
|
+
*/
|
|
17
|
+
export interface DialectWriter {
|
|
18
|
+
/** Quotes an identifier, escaping the closing quote character inside it. */
|
|
19
|
+
QuoteIdentifier(name: string): string;
|
|
20
|
+
/** Writes a schema-qualified object name. */
|
|
21
|
+
QuoteSchema(schema: string, object: string): string;
|
|
22
|
+
/** Writes a column alias so the result column keeps the alias's case. */
|
|
23
|
+
QuoteColumnAlias(aliasName: string): string;
|
|
24
|
+
/** Writes `value` as a string literal that the dialect reads back as exactly `value`. */
|
|
25
|
+
QuoteStringLiteral(value: string): string;
|
|
26
|
+
/** The prefix a string literal holding `text` needs so no character is lost, or `''`. */
|
|
27
|
+
StringLiteralPrefix(text: string): string;
|
|
28
|
+
/** Escapes the characters a `LIKE` pattern treats specially, for the dialect's default escape rules. */
|
|
29
|
+
EscapeLikePattern(text: string): string;
|
|
30
|
+
/** A boolean literal. */
|
|
31
|
+
BooleanLiteral(value: boolean): string;
|
|
32
|
+
/** The NULL literal. */
|
|
33
|
+
readonly NullLiteral: string;
|
|
34
|
+
/** The row-cap fragments for `limit` rows after skipping `offset`. */
|
|
35
|
+
LimitClause(limit: number, offset?: number): LimitClauseResult;
|
|
36
|
+
/** `CAST(expr AS sqlType)`. */
|
|
37
|
+
Cast(expr: string, sqlType: string): string;
|
|
38
|
+
/** A cast of `expr` to the dialect's unbounded text type. */
|
|
39
|
+
CastToText(expr: string): string;
|
|
40
|
+
/** The n-ary null-coalescing expression. */
|
|
41
|
+
Coalesce(expr: string, fallback: string): string;
|
|
42
|
+
/** The two-argument null-coalescing expression in the dialect's native spelling. */
|
|
43
|
+
IsNull(expr: string, fallback: string): string;
|
|
44
|
+
/** The string concatenation operator, or `null` when the dialect has none (it uses a function). */
|
|
45
|
+
ConcatOperator(): string | null;
|
|
46
|
+
/** Concatenates string expressions. */
|
|
47
|
+
Concat(...parts: string[]): string;
|
|
48
|
+
/** Extracts a scalar value from a JSON column; `path` is in the dialect's own path syntax. */
|
|
49
|
+
JsonExtract(column: string, path: string): string;
|
|
50
|
+
/** Adds `amount` units to a timestamp expression. */
|
|
51
|
+
DateAddExpression(unit: DateAddUnit, amount: number, baseExpr: string): string;
|
|
52
|
+
/** The current UTC timestamp. */
|
|
53
|
+
CurrentTimestampUTC(): string;
|
|
54
|
+
/** Lower-cases an expression. */
|
|
55
|
+
LowerCase(expr: string): string;
|
|
56
|
+
/** A conditional expression. */
|
|
57
|
+
IIF(condition: string, trueVal: string, falseVal: string): string;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=dialectWriter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectWriter.d.ts","sourceRoot":"","sources":["../../src/facets/dialectWriter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,kEAAkE;AAClE,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,4EAA4E;IAC5E,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,6CAA6C;IAC7C,WAAW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AAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/E,iCAAiC;IACjC,mBAAmB,IAAI,MAAM,CAAC;IAC9B,iCAAiC;IACjC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,gCAAgC;IAChC,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CACrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectWriter.js","sourceRoot":"","sources":["../../src/facets/dialectWriter.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
export { DataTypeMap, MappedType } from './dataTypeMap.js';
|
|
2
|
-
export { SQLDialect, DatabasePlatform
|
|
2
|
+
export { SQLDialect, DatabasePlatform } from './sqlDialect.js';
|
|
3
3
|
export type { SQLParserDialect } from './sqlDialect.js';
|
|
4
|
-
export type {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
4
|
+
export type { LimitClauseResult, DateAddUnit, DialectWriter } from './facets/dialectWriter.js';
|
|
5
|
+
export type { SchemaFieldType, ResolveTypeOptions, SchemaIntrospectionSQL, TriggerOptions, IndexOptions, ColumnDDLOptions, AlterColumnOptions, DialectSchemaDDL, } from './facets/dialectSchemaDDL.js';
|
|
6
|
+
export type { DialectKey } from './facets/dialectKey.js';
|
|
7
|
+
export type { DialectLexicalRules, IdentifierQuoteForm, StringLiteralForm, DollarQuoting, LineCommentForm, BlockCommentRules, ParameterPlaceholderForm, IdentifierCaseFolding, } from './facets/dialectLexicalRules.js';
|
|
8
|
+
export type { DialectGrammar, RowCapForm, CorrelatedJoinForm, ColumnAliasForm } from './facets/dialectGrammar.js';
|
|
9
|
+
export type { DialectTypes } from './facets/dialectTypes.js';
|
|
10
|
+
export type { DialectBinding, TypedParameterReference } from './facets/dialectBinding.js';
|
|
11
|
+
export { QueryDialect } from './queryDialect.js';
|
|
12
|
+
export type { ParserDialect } from './queryDialect.js';
|
|
13
|
+
export { AnsiQueryDialect, AnsiWriter, ANSI_LEXICAL, ANSI_GRAMMAR, ANSI_WRITE_STATEMENT_KEYWORDS } from './dialects/ansi.js';
|
|
14
|
+
export { BaseSchemaDDL } from './dialects/baseSchemaDDL.js';
|
|
15
|
+
export { SQLServerDialect, SQLServerWriter, SQLServerBinding, SQL_SERVER_LEXICAL, SQL_SERVER_GRAMMAR, SQL_SERVER_TYPES, } from './sqlServerDialect.js';
|
|
16
|
+
export { PostgreSQLDialect, PostgreSQLWriter, PostgreSQLBinding, POSTGRESQL_LEXICAL, POSTGRESQL_GRAMMAR, POSTGRESQL_TYPES, } from './postgresqlDialect.js';
|
|
17
|
+
export { SQLServerSchemaDDL } from './dialects/sqlServerSchemaDDL.js';
|
|
18
|
+
export { PostgreSQLSchemaDDL } from './dialects/postgresqlSchemaDDL.js';
|
|
19
|
+
export { MySQLQueryDialect, MySQLWriter, MYSQL_LEXICAL, MYSQL_GRAMMAR } from './dialects/mysqlQueryDialect.js';
|
|
20
|
+
export { OracleQueryDialect, OracleWriter, ORACLE_LEXICAL, ORACLE_GRAMMAR } from './dialects/oracleQueryDialect.js';
|
|
21
|
+
export { SnowflakeQueryDialect, SnowflakeWriter, SNOWFLAKE_LEXICAL, SNOWFLAKE_GRAMMAR } from './dialects/snowflakeQueryDialect.js';
|
|
22
|
+
export { DatabricksQueryDialect, DatabricksWriter, DATABRICKS_LEXICAL, DATABRICKS_GRAMMAR } from './dialects/databricksQueryDialect.js';
|
|
23
|
+
export { GetDialect, GetQueryDialect, IsSupportedPlatform, SupportedPlatforms, RegisteredDialectKeys, ShippedQueryOnlyDialectKeys, } from './dialectFactory.js';
|
|
8
24
|
export { FindReferencedIdentifiers, IdentifierMatches } from './identifierReferences.js';
|
|
9
25
|
export { RestarLayeredOuterView, restarLayeredOuterView, BuildCreateOrReplaceLayeredOuterViewSQL, buildCreateOrReplaceLayeredOuterViewSQL, LayeredOuterRestarError, FindTopLevelKeyword, findTopLevelKeyword, SplitTopLevelCommaList, splitTopLevelCommaList, } from './postgresqlRestarLayeredOuter.js';
|
|
10
26
|
export type { RestarLayeredOuterViewArgs } from './postgresqlRestarLayeredOuter.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/F,YAAY,EACR,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,YAAY,EACR,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,GACxB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClH,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,YAAY,EAAE,cA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sBAAsB,EAAE,sBAAsB,EAC9C,uCAAuC,EAAE,uCAAuC,EAChF,uBAAuB,EACvB,mBAAmB,EAAE,mBAAmB,EACxC,sBAAsB,EAAE,sBAAsB,GACjD,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EACH,8BAA8B,EAC9B,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,sCAAsC,GACzC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
export { SQLDialect
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { SQLDialect } from './sqlDialect.js';
|
|
2
|
+
export { QueryDialect } from './queryDialect.js';
|
|
3
|
+
export { AnsiQueryDialect, AnsiWriter, ANSI_LEXICAL, ANSI_GRAMMAR, ANSI_WRITE_STATEMENT_KEYWORDS } from './dialects/ansi.js';
|
|
4
|
+
export { BaseSchemaDDL } from './dialects/baseSchemaDDL.js';
|
|
5
|
+
export { SQLServerDialect, SQLServerWriter, SQLServerBinding, SQL_SERVER_LEXICAL, SQL_SERVER_GRAMMAR, SQL_SERVER_TYPES, } from './sqlServerDialect.js';
|
|
6
|
+
export { PostgreSQLDialect, PostgreSQLWriter, PostgreSQLBinding, POSTGRESQL_LEXICAL, POSTGRESQL_GRAMMAR, POSTGRESQL_TYPES, } from './postgresqlDialect.js';
|
|
7
|
+
export { SQLServerSchemaDDL } from './dialects/sqlServerSchemaDDL.js';
|
|
8
|
+
export { PostgreSQLSchemaDDL } from './dialects/postgresqlSchemaDDL.js';
|
|
9
|
+
export { MySQLQueryDialect, MySQLWriter, MYSQL_LEXICAL, MYSQL_GRAMMAR } from './dialects/mysqlQueryDialect.js';
|
|
10
|
+
export { OracleQueryDialect, OracleWriter, ORACLE_LEXICAL, ORACLE_GRAMMAR } from './dialects/oracleQueryDialect.js';
|
|
11
|
+
export { SnowflakeQueryDialect, SnowflakeWriter, SNOWFLAKE_LEXICAL, SNOWFLAKE_GRAMMAR } from './dialects/snowflakeQueryDialect.js';
|
|
12
|
+
export { DatabricksQueryDialect, DatabricksWriter, DATABRICKS_LEXICAL, DATABRICKS_GRAMMAR } from './dialects/databricksQueryDialect.js';
|
|
13
|
+
export { GetDialect, GetQueryDialect, IsSupportedPlatform, SupportedPlatforms, RegisteredDialectKeys, ShippedQueryOnlyDialectKeys, } from './dialectFactory.js';
|
|
5
14
|
export { FindReferencedIdentifiers, IdentifierMatches } from './identifierReferences.js';
|
|
6
15
|
export { RestarLayeredOuterView, restarLayeredOuterView, BuildCreateOrReplaceLayeredOuterViewSQL, buildCreateOrReplaceLayeredOuterViewSQL, LayeredOuterRestarError, FindTopLevelKeyword, findTopLevelKeyword, SplitTopLevelCommaList, splitTopLevelCommaList, } from './postgresqlRestarLayeredOuter.js';
|
|
7
16
|
export { AutoQuotePostgreSQLIdentifiers, AutoQuoteLeavesWordBare, PostgreSQLQuotingKeywords, PostgreSQLStructuralKeywords, PostgreSQLContextualStructuralKeywords, } from './postgresqlAutoQuote.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAoB,MAAM,iBAAiB,CAAC;AA2B/D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EA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