@polyglot-sql/sdk 0.1.14 → 0.2.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/dist/cdn/polyglot.esm.js +1775 -1775
- package/dist/index.d.cts +57 -1
- package/dist/index.d.ts +57 -1
- package/dist/polyglot_sql_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -884,6 +884,13 @@ declare type ArrayTransformFunc = {
|
|
|
884
884
|
transform: Expression;
|
|
885
885
|
};
|
|
886
886
|
|
|
887
|
+
/**
|
|
888
|
+
* AssumeColumnConstraint (ClickHouse ASSUME constraint)
|
|
889
|
+
*/
|
|
890
|
+
declare type AssumeColumnConstraint = {
|
|
891
|
+
this: Expression;
|
|
892
|
+
};
|
|
893
|
+
|
|
887
894
|
export declare namespace ast {
|
|
888
895
|
export {
|
|
889
896
|
ExpressionByKey,
|
|
@@ -2314,6 +2321,14 @@ declare type CreateFunction = {
|
|
|
2314
2321
|
* Databricks: ENVIRONMENT (dependencies = '...', environment_version = '...')
|
|
2315
2322
|
*/
|
|
2316
2323
|
environment?: Array<Expression>;
|
|
2324
|
+
/**
|
|
2325
|
+
* HANDLER 'handler_function' clause (Databricks)
|
|
2326
|
+
*/
|
|
2327
|
+
handler?: string | null;
|
|
2328
|
+
/**
|
|
2329
|
+
* PARAMETER STYLE clause (e.g., PANDAS for Databricks)
|
|
2330
|
+
*/
|
|
2331
|
+
parameter_style?: string | null;
|
|
2317
2332
|
};
|
|
2318
2333
|
|
|
2319
2334
|
/**
|
|
@@ -2627,6 +2642,10 @@ declare type CreateView = {
|
|
|
2627
2642
|
* True for MySQL-style "SQL SECURITY", false for Presto-style "SECURITY"
|
|
2628
2643
|
*/
|
|
2629
2644
|
security_sql_style: boolean;
|
|
2645
|
+
/**
|
|
2646
|
+
* True when SQL SECURITY appears after the view name (not before VIEW keyword)
|
|
2647
|
+
*/
|
|
2648
|
+
security_after_name: boolean;
|
|
2630
2649
|
/**
|
|
2631
2650
|
* Whether the query was parenthesized: AS (SELECT ...)
|
|
2632
2651
|
*/
|
|
@@ -3151,6 +3170,7 @@ declare type DDLExpression = ExpressionByType<'create_table'> | ExpressionByType
|
|
|
3151
3170
|
*/
|
|
3152
3171
|
declare type Declare = {
|
|
3153
3172
|
expressions: Array<Expression>;
|
|
3173
|
+
replace: boolean;
|
|
3154
3174
|
};
|
|
3155
3175
|
|
|
3156
3176
|
/**
|
|
@@ -3619,6 +3639,10 @@ declare type DPipe = {
|
|
|
3619
3639
|
declare type DropDatabase = {
|
|
3620
3640
|
name: Identifier;
|
|
3621
3641
|
if_exists: boolean;
|
|
3642
|
+
/**
|
|
3643
|
+
* ClickHouse: SYNC modifier
|
|
3644
|
+
*/
|
|
3645
|
+
sync: boolean;
|
|
3622
3646
|
};
|
|
3623
3647
|
|
|
3624
3648
|
/**
|
|
@@ -3713,6 +3737,10 @@ declare type DropTable = {
|
|
|
3713
3737
|
* When set, TSQL generator outputs IF NOT OBJECT_ID(...) IS NULL BEGIN DROP TABLE ...; END
|
|
3714
3738
|
*/
|
|
3715
3739
|
object_id_args?: string | null;
|
|
3740
|
+
/**
|
|
3741
|
+
* ClickHouse: SYNC modifier
|
|
3742
|
+
*/
|
|
3743
|
+
sync: boolean;
|
|
3716
3744
|
};
|
|
3717
3745
|
|
|
3718
3746
|
/**
|
|
@@ -4746,6 +4774,8 @@ declare type Expression = {
|
|
|
4746
4774
|
"transform_keys": TransformFunc;
|
|
4747
4775
|
} | {
|
|
4748
4776
|
"transform_values": TransformFunc;
|
|
4777
|
+
} | {
|
|
4778
|
+
"function_emits": FunctionEmits;
|
|
4749
4779
|
} | {
|
|
4750
4780
|
"json_extract": JsonExtractFunc;
|
|
4751
4781
|
} | {
|
|
@@ -4990,6 +5020,8 @@ declare type Expression = {
|
|
|
4990
5020
|
"character_set_column_constraint": CharacterSetColumnConstraint;
|
|
4991
5021
|
} | {
|
|
4992
5022
|
"check_column_constraint": CheckColumnConstraint;
|
|
5023
|
+
} | {
|
|
5024
|
+
"assume_column_constraint": AssumeColumnConstraint;
|
|
4993
5025
|
} | {
|
|
4994
5026
|
"compress_column_constraint": CompressColumnConstraint;
|
|
4995
5027
|
} | {
|
|
@@ -6341,6 +6373,21 @@ declare type FunctionBody = {
|
|
|
6341
6373
|
};
|
|
6342
6374
|
};
|
|
6343
6375
|
|
|
6376
|
+
/**
|
|
6377
|
+
* Function call with EMITS clause (Exasol)
|
|
6378
|
+
* Used for JSON_EXTRACT(...) EMITS (col1 TYPE1, col2 TYPE2)
|
|
6379
|
+
*/
|
|
6380
|
+
declare type FunctionEmits = {
|
|
6381
|
+
/**
|
|
6382
|
+
* The function call expression
|
|
6383
|
+
*/
|
|
6384
|
+
this: Expression;
|
|
6385
|
+
/**
|
|
6386
|
+
* The EMITS schema definition
|
|
6387
|
+
*/
|
|
6388
|
+
emits: Expression;
|
|
6389
|
+
};
|
|
6390
|
+
|
|
6344
6391
|
/**
|
|
6345
6392
|
* Union of all function-related expression types
|
|
6346
6393
|
*/
|
|
@@ -6363,7 +6410,7 @@ declare type FunctionParameter = {
|
|
|
6363
6410
|
/**
|
|
6364
6411
|
* Types of properties in CREATE FUNCTION for tracking their original order
|
|
6365
6412
|
*/
|
|
6366
|
-
declare type FunctionPropertyKind = "Set" | "As" | "Language" | "Determinism" | "NullInput" | "Security" | "SqlDataAccess" | "Options" | "Environment";
|
|
6413
|
+
declare type FunctionPropertyKind = "Set" | "As" | "Language" | "Determinism" | "NullInput" | "Security" | "SqlDataAccess" | "Options" | "Environment" | "Handler" | "ParameterStyle";
|
|
6367
6414
|
|
|
6368
6415
|
/**
|
|
6369
6416
|
* Function security (DEFINER, INVOKER, or NONE)
|
|
@@ -12508,6 +12555,11 @@ declare type TableConstraint = {
|
|
|
12508
12555
|
expression: Expression;
|
|
12509
12556
|
modifiers: ConstraintModifiers;
|
|
12510
12557
|
};
|
|
12558
|
+
} | {
|
|
12559
|
+
"Assume": {
|
|
12560
|
+
name: Identifier | null;
|
|
12561
|
+
expression: Expression;
|
|
12562
|
+
};
|
|
12511
12563
|
} | {
|
|
12512
12564
|
"Index": {
|
|
12513
12565
|
name: Identifier | null;
|
|
@@ -13998,6 +14050,10 @@ declare type ValueFunc = {
|
|
|
13998
14050
|
* None = not specified, Some(true) = IGNORE NULLS, Some(false) = RESPECT NULLS
|
|
13999
14051
|
*/
|
|
14000
14052
|
ignore_nulls?: boolean | null;
|
|
14053
|
+
/**
|
|
14054
|
+
* ORDER BY inside the function parens (e.g., DuckDB: LAST_VALUE(x ORDER BY x))
|
|
14055
|
+
*/
|
|
14056
|
+
order_by?: Array<Ordered>;
|
|
14001
14057
|
};
|
|
14002
14058
|
|
|
14003
14059
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -884,6 +884,13 @@ declare type ArrayTransformFunc = {
|
|
|
884
884
|
transform: Expression;
|
|
885
885
|
};
|
|
886
886
|
|
|
887
|
+
/**
|
|
888
|
+
* AssumeColumnConstraint (ClickHouse ASSUME constraint)
|
|
889
|
+
*/
|
|
890
|
+
declare type AssumeColumnConstraint = {
|
|
891
|
+
this: Expression;
|
|
892
|
+
};
|
|
893
|
+
|
|
887
894
|
export declare namespace ast {
|
|
888
895
|
export {
|
|
889
896
|
ExpressionByKey,
|
|
@@ -2314,6 +2321,14 @@ declare type CreateFunction = {
|
|
|
2314
2321
|
* Databricks: ENVIRONMENT (dependencies = '...', environment_version = '...')
|
|
2315
2322
|
*/
|
|
2316
2323
|
environment?: Array<Expression>;
|
|
2324
|
+
/**
|
|
2325
|
+
* HANDLER 'handler_function' clause (Databricks)
|
|
2326
|
+
*/
|
|
2327
|
+
handler?: string | null;
|
|
2328
|
+
/**
|
|
2329
|
+
* PARAMETER STYLE clause (e.g., PANDAS for Databricks)
|
|
2330
|
+
*/
|
|
2331
|
+
parameter_style?: string | null;
|
|
2317
2332
|
};
|
|
2318
2333
|
|
|
2319
2334
|
/**
|
|
@@ -2627,6 +2642,10 @@ declare type CreateView = {
|
|
|
2627
2642
|
* True for MySQL-style "SQL SECURITY", false for Presto-style "SECURITY"
|
|
2628
2643
|
*/
|
|
2629
2644
|
security_sql_style: boolean;
|
|
2645
|
+
/**
|
|
2646
|
+
* True when SQL SECURITY appears after the view name (not before VIEW keyword)
|
|
2647
|
+
*/
|
|
2648
|
+
security_after_name: boolean;
|
|
2630
2649
|
/**
|
|
2631
2650
|
* Whether the query was parenthesized: AS (SELECT ...)
|
|
2632
2651
|
*/
|
|
@@ -3151,6 +3170,7 @@ declare type DDLExpression = ExpressionByType<'create_table'> | ExpressionByType
|
|
|
3151
3170
|
*/
|
|
3152
3171
|
declare type Declare = {
|
|
3153
3172
|
expressions: Array<Expression>;
|
|
3173
|
+
replace: boolean;
|
|
3154
3174
|
};
|
|
3155
3175
|
|
|
3156
3176
|
/**
|
|
@@ -3619,6 +3639,10 @@ declare type DPipe = {
|
|
|
3619
3639
|
declare type DropDatabase = {
|
|
3620
3640
|
name: Identifier;
|
|
3621
3641
|
if_exists: boolean;
|
|
3642
|
+
/**
|
|
3643
|
+
* ClickHouse: SYNC modifier
|
|
3644
|
+
*/
|
|
3645
|
+
sync: boolean;
|
|
3622
3646
|
};
|
|
3623
3647
|
|
|
3624
3648
|
/**
|
|
@@ -3713,6 +3737,10 @@ declare type DropTable = {
|
|
|
3713
3737
|
* When set, TSQL generator outputs IF NOT OBJECT_ID(...) IS NULL BEGIN DROP TABLE ...; END
|
|
3714
3738
|
*/
|
|
3715
3739
|
object_id_args?: string | null;
|
|
3740
|
+
/**
|
|
3741
|
+
* ClickHouse: SYNC modifier
|
|
3742
|
+
*/
|
|
3743
|
+
sync: boolean;
|
|
3716
3744
|
};
|
|
3717
3745
|
|
|
3718
3746
|
/**
|
|
@@ -4746,6 +4774,8 @@ declare type Expression = {
|
|
|
4746
4774
|
"transform_keys": TransformFunc;
|
|
4747
4775
|
} | {
|
|
4748
4776
|
"transform_values": TransformFunc;
|
|
4777
|
+
} | {
|
|
4778
|
+
"function_emits": FunctionEmits;
|
|
4749
4779
|
} | {
|
|
4750
4780
|
"json_extract": JsonExtractFunc;
|
|
4751
4781
|
} | {
|
|
@@ -4990,6 +5020,8 @@ declare type Expression = {
|
|
|
4990
5020
|
"character_set_column_constraint": CharacterSetColumnConstraint;
|
|
4991
5021
|
} | {
|
|
4992
5022
|
"check_column_constraint": CheckColumnConstraint;
|
|
5023
|
+
} | {
|
|
5024
|
+
"assume_column_constraint": AssumeColumnConstraint;
|
|
4993
5025
|
} | {
|
|
4994
5026
|
"compress_column_constraint": CompressColumnConstraint;
|
|
4995
5027
|
} | {
|
|
@@ -6341,6 +6373,21 @@ declare type FunctionBody = {
|
|
|
6341
6373
|
};
|
|
6342
6374
|
};
|
|
6343
6375
|
|
|
6376
|
+
/**
|
|
6377
|
+
* Function call with EMITS clause (Exasol)
|
|
6378
|
+
* Used for JSON_EXTRACT(...) EMITS (col1 TYPE1, col2 TYPE2)
|
|
6379
|
+
*/
|
|
6380
|
+
declare type FunctionEmits = {
|
|
6381
|
+
/**
|
|
6382
|
+
* The function call expression
|
|
6383
|
+
*/
|
|
6384
|
+
this: Expression;
|
|
6385
|
+
/**
|
|
6386
|
+
* The EMITS schema definition
|
|
6387
|
+
*/
|
|
6388
|
+
emits: Expression;
|
|
6389
|
+
};
|
|
6390
|
+
|
|
6344
6391
|
/**
|
|
6345
6392
|
* Union of all function-related expression types
|
|
6346
6393
|
*/
|
|
@@ -6363,7 +6410,7 @@ declare type FunctionParameter = {
|
|
|
6363
6410
|
/**
|
|
6364
6411
|
* Types of properties in CREATE FUNCTION for tracking their original order
|
|
6365
6412
|
*/
|
|
6366
|
-
declare type FunctionPropertyKind = "Set" | "As" | "Language" | "Determinism" | "NullInput" | "Security" | "SqlDataAccess" | "Options" | "Environment";
|
|
6413
|
+
declare type FunctionPropertyKind = "Set" | "As" | "Language" | "Determinism" | "NullInput" | "Security" | "SqlDataAccess" | "Options" | "Environment" | "Handler" | "ParameterStyle";
|
|
6367
6414
|
|
|
6368
6415
|
/**
|
|
6369
6416
|
* Function security (DEFINER, INVOKER, or NONE)
|
|
@@ -12508,6 +12555,11 @@ declare type TableConstraint = {
|
|
|
12508
12555
|
expression: Expression;
|
|
12509
12556
|
modifiers: ConstraintModifiers;
|
|
12510
12557
|
};
|
|
12558
|
+
} | {
|
|
12559
|
+
"Assume": {
|
|
12560
|
+
name: Identifier | null;
|
|
12561
|
+
expression: Expression;
|
|
12562
|
+
};
|
|
12511
12563
|
} | {
|
|
12512
12564
|
"Index": {
|
|
12513
12565
|
name: Identifier | null;
|
|
@@ -13998,6 +14050,10 @@ declare type ValueFunc = {
|
|
|
13998
14050
|
* None = not specified, Some(true) = IGNORE NULLS, Some(false) = RESPECT NULLS
|
|
13999
14051
|
*/
|
|
14000
14052
|
ignore_nulls?: boolean | null;
|
|
14053
|
+
/**
|
|
14054
|
+
* ORDER BY inside the function parens (e.g., DuckDB: LAST_VALUE(x ORDER BY x))
|
|
14055
|
+
*/
|
|
14056
|
+
order_by?: Array<Ordered>;
|
|
14001
14057
|
};
|
|
14002
14058
|
|
|
14003
14059
|
/**
|
|
Binary file
|