@polyglot-sql/sdk 0.1.15 → 0.2.1
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 +1216 -1216
- package/dist/index.d.cts +155 -3
- package/dist/index.d.ts +155 -3
- package/dist/polyglot_sql_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -313,6 +313,10 @@ declare type AlterTable = {
|
|
|
313
313
|
* ClickHouse: ON CLUSTER clause for distributed DDL
|
|
314
314
|
*/
|
|
315
315
|
on_cluster?: OnCluster | null;
|
|
316
|
+
/**
|
|
317
|
+
* Snowflake: ALTER ICEBERG TABLE
|
|
318
|
+
*/
|
|
319
|
+
table_modifier?: string | null;
|
|
316
320
|
};
|
|
317
321
|
|
|
318
322
|
/**
|
|
@@ -884,6 +888,13 @@ declare type ArrayTransformFunc = {
|
|
|
884
888
|
transform: Expression;
|
|
885
889
|
};
|
|
886
890
|
|
|
891
|
+
/**
|
|
892
|
+
* AssumeColumnConstraint (ClickHouse ASSUME constraint)
|
|
893
|
+
*/
|
|
894
|
+
declare type AssumeColumnConstraint = {
|
|
895
|
+
this: Expression;
|
|
896
|
+
};
|
|
897
|
+
|
|
887
898
|
export declare namespace ast {
|
|
888
899
|
export {
|
|
889
900
|
ExpressionByKey,
|
|
@@ -2268,6 +2279,10 @@ declare type CreateFunction = {
|
|
|
2268
2279
|
return_type: DataType | null;
|
|
2269
2280
|
body: FunctionBody | null;
|
|
2270
2281
|
or_replace: boolean;
|
|
2282
|
+
/**
|
|
2283
|
+
* TSQL: CREATE OR ALTER
|
|
2284
|
+
*/
|
|
2285
|
+
or_alter?: boolean;
|
|
2271
2286
|
if_not_exists: boolean;
|
|
2272
2287
|
temporary: boolean;
|
|
2273
2288
|
language: string | null;
|
|
@@ -2314,6 +2329,14 @@ declare type CreateFunction = {
|
|
|
2314
2329
|
* Databricks: ENVIRONMENT (dependencies = '...', environment_version = '...')
|
|
2315
2330
|
*/
|
|
2316
2331
|
environment?: Array<Expression>;
|
|
2332
|
+
/**
|
|
2333
|
+
* HANDLER 'handler_function' clause (Databricks)
|
|
2334
|
+
*/
|
|
2335
|
+
handler?: string | null;
|
|
2336
|
+
/**
|
|
2337
|
+
* PARAMETER STYLE clause (e.g., PANDAS for Databricks)
|
|
2338
|
+
*/
|
|
2339
|
+
parameter_style?: string | null;
|
|
2317
2340
|
};
|
|
2318
2341
|
|
|
2319
2342
|
/**
|
|
@@ -2360,6 +2383,10 @@ declare type CreateProcedure = {
|
|
|
2360
2383
|
parameters: Array<FunctionParameter>;
|
|
2361
2384
|
body: FunctionBody | null;
|
|
2362
2385
|
or_replace: boolean;
|
|
2386
|
+
/**
|
|
2387
|
+
* TSQL: CREATE OR ALTER
|
|
2388
|
+
*/
|
|
2389
|
+
or_alter?: boolean;
|
|
2363
2390
|
if_not_exists: boolean;
|
|
2364
2391
|
language: string | null;
|
|
2365
2392
|
security: FunctionSecurity | null;
|
|
@@ -2389,10 +2416,16 @@ declare type CreateProcedure = {
|
|
|
2389
2416
|
* CREATE SCHEMA statement
|
|
2390
2417
|
*/
|
|
2391
2418
|
declare type CreateSchema = {
|
|
2392
|
-
|
|
2419
|
+
/**
|
|
2420
|
+
* Schema name parts, possibly dot-qualified (e.g. [mydb, hr] for "mydb.hr")
|
|
2421
|
+
*/
|
|
2422
|
+
name: Array<Identifier>;
|
|
2393
2423
|
if_not_exists: boolean;
|
|
2394
2424
|
authorization: Identifier | null;
|
|
2395
|
-
|
|
2425
|
+
/**
|
|
2426
|
+
* CLONE source parts, possibly dot-qualified
|
|
2427
|
+
*/
|
|
2428
|
+
clone_from: Array<Identifier> | null;
|
|
2396
2429
|
/**
|
|
2397
2430
|
* AT/BEFORE clause for time travel (Snowflake)
|
|
2398
2431
|
*/
|
|
@@ -2456,6 +2489,20 @@ declare type CreateSequence = {
|
|
|
2456
2489
|
property_order: Array<SeqPropKind>;
|
|
2457
2490
|
};
|
|
2458
2491
|
|
|
2492
|
+
/**
|
|
2493
|
+
* CREATE SYNONYM statement (TSQL)
|
|
2494
|
+
*/
|
|
2495
|
+
declare type CreateSynonym = {
|
|
2496
|
+
/**
|
|
2497
|
+
* The synonym name (can be qualified: schema.synonym_name)
|
|
2498
|
+
*/
|
|
2499
|
+
name: TableRef;
|
|
2500
|
+
/**
|
|
2501
|
+
* The target object the synonym refers to
|
|
2502
|
+
*/
|
|
2503
|
+
target: TableRef;
|
|
2504
|
+
};
|
|
2505
|
+
|
|
2459
2506
|
/**
|
|
2460
2507
|
* CREATE TABLE statement
|
|
2461
2508
|
*/
|
|
@@ -2563,6 +2610,30 @@ declare type CreateTable = {
|
|
|
2563
2610
|
* StarRocks: ROLLUP (r1(col1, col2), r2(col1))
|
|
2564
2611
|
*/
|
|
2565
2612
|
rollup?: RollupProperty | null;
|
|
2613
|
+
/**
|
|
2614
|
+
* ClickHouse: UUID 'xxx' clause after table name
|
|
2615
|
+
*/
|
|
2616
|
+
uuid?: string | null;
|
|
2617
|
+
};
|
|
2618
|
+
|
|
2619
|
+
/**
|
|
2620
|
+
* Snowflake CREATE TASK statement
|
|
2621
|
+
*/
|
|
2622
|
+
declare type CreateTask = {
|
|
2623
|
+
or_replace: boolean;
|
|
2624
|
+
if_not_exists: boolean;
|
|
2625
|
+
/**
|
|
2626
|
+
* Task name (possibly qualified: db.schema.task)
|
|
2627
|
+
*/
|
|
2628
|
+
name: string;
|
|
2629
|
+
/**
|
|
2630
|
+
* Raw text of properties between name and AS (WAREHOUSE, SCHEDULE, etc.)
|
|
2631
|
+
*/
|
|
2632
|
+
properties: string;
|
|
2633
|
+
/**
|
|
2634
|
+
* The SQL statement body after AS
|
|
2635
|
+
*/
|
|
2636
|
+
body: Expression;
|
|
2566
2637
|
};
|
|
2567
2638
|
|
|
2568
2639
|
/**
|
|
@@ -2581,6 +2652,10 @@ declare type CreateTrigger = {
|
|
|
2581
2652
|
when_paren?: boolean;
|
|
2582
2653
|
body: TriggerBody;
|
|
2583
2654
|
or_replace: boolean;
|
|
2655
|
+
/**
|
|
2656
|
+
* TSQL: CREATE OR ALTER
|
|
2657
|
+
*/
|
|
2658
|
+
or_alter?: boolean;
|
|
2584
2659
|
constraint: boolean;
|
|
2585
2660
|
deferrable: boolean | null;
|
|
2586
2661
|
initially_deferred: boolean | null;
|
|
@@ -2604,6 +2679,10 @@ declare type CreateView = {
|
|
|
2604
2679
|
columns: Array<ViewColumn>;
|
|
2605
2680
|
query: Expression;
|
|
2606
2681
|
or_replace: boolean;
|
|
2682
|
+
/**
|
|
2683
|
+
* TSQL: CREATE OR ALTER
|
|
2684
|
+
*/
|
|
2685
|
+
or_alter?: boolean;
|
|
2607
2686
|
if_not_exists: boolean;
|
|
2608
2687
|
materialized: boolean;
|
|
2609
2688
|
temporary: boolean;
|
|
@@ -2627,6 +2706,10 @@ declare type CreateView = {
|
|
|
2627
2706
|
* True for MySQL-style "SQL SECURITY", false for Presto-style "SECURITY"
|
|
2628
2707
|
*/
|
|
2629
2708
|
security_sql_style: boolean;
|
|
2709
|
+
/**
|
|
2710
|
+
* True when SQL SECURITY appears after the view name (not before VIEW keyword)
|
|
2711
|
+
*/
|
|
2712
|
+
security_after_name: boolean;
|
|
2630
2713
|
/**
|
|
2631
2714
|
* Whether the query was parenthesized: AS (SELECT ...)
|
|
2632
2715
|
*/
|
|
@@ -3151,6 +3234,7 @@ declare type DDLExpression = ExpressionByType<'create_table'> | ExpressionByType
|
|
|
3151
3234
|
*/
|
|
3152
3235
|
declare type Declare = {
|
|
3153
3236
|
expressions: Array<Expression>;
|
|
3237
|
+
replace: boolean;
|
|
3154
3238
|
};
|
|
3155
3239
|
|
|
3156
3240
|
/**
|
|
@@ -3251,6 +3335,10 @@ export default _default;
|
|
|
3251
3335
|
*/
|
|
3252
3336
|
declare type DefaultColumnConstraint = {
|
|
3253
3337
|
this: Expression;
|
|
3338
|
+
/**
|
|
3339
|
+
* TSQL: DEFAULT value FOR column (table-level default constraint)
|
|
3340
|
+
*/
|
|
3341
|
+
for_column?: Identifier | null;
|
|
3254
3342
|
};
|
|
3255
3343
|
|
|
3256
3344
|
/**
|
|
@@ -3619,6 +3707,10 @@ declare type DPipe = {
|
|
|
3619
3707
|
declare type DropDatabase = {
|
|
3620
3708
|
name: Identifier;
|
|
3621
3709
|
if_exists: boolean;
|
|
3710
|
+
/**
|
|
3711
|
+
* ClickHouse: SYNC modifier
|
|
3712
|
+
*/
|
|
3713
|
+
sync: boolean;
|
|
3622
3714
|
};
|
|
3623
3715
|
|
|
3624
3716
|
/**
|
|
@@ -3713,6 +3805,18 @@ declare type DropTable = {
|
|
|
3713
3805
|
* When set, TSQL generator outputs IF NOT OBJECT_ID(...) IS NULL BEGIN DROP TABLE ...; END
|
|
3714
3806
|
*/
|
|
3715
3807
|
object_id_args?: string | null;
|
|
3808
|
+
/**
|
|
3809
|
+
* ClickHouse: SYNC modifier
|
|
3810
|
+
*/
|
|
3811
|
+
sync: boolean;
|
|
3812
|
+
/**
|
|
3813
|
+
* Snowflake: DROP ICEBERG TABLE
|
|
3814
|
+
*/
|
|
3815
|
+
iceberg: boolean;
|
|
3816
|
+
/**
|
|
3817
|
+
* RESTRICT modifier (opposite of CASCADE)
|
|
3818
|
+
*/
|
|
3819
|
+
restrict: boolean;
|
|
3716
3820
|
};
|
|
3717
3821
|
|
|
3718
3822
|
/**
|
|
@@ -3966,6 +4070,10 @@ declare type ExecuteParameter = {
|
|
|
3966
4070
|
* Whether this is a positional parameter (no = sign)
|
|
3967
4071
|
*/
|
|
3968
4072
|
positional?: boolean;
|
|
4073
|
+
/**
|
|
4074
|
+
* TSQL OUTPUT modifier on parameter
|
|
4075
|
+
*/
|
|
4076
|
+
output?: boolean;
|
|
3969
4077
|
};
|
|
3970
4078
|
|
|
3971
4079
|
/**
|
|
@@ -3981,6 +4089,10 @@ declare type ExecuteStatement = {
|
|
|
3981
4089
|
* Named parameters: @param=value pairs
|
|
3982
4090
|
*/
|
|
3983
4091
|
parameters: Array<ExecuteParameter>;
|
|
4092
|
+
/**
|
|
4093
|
+
* Trailing clause text (e.g. WITH RESULT SETS ((...)))
|
|
4094
|
+
*/
|
|
4095
|
+
suffix?: string | null;
|
|
3984
4096
|
};
|
|
3985
4097
|
|
|
3986
4098
|
/**
|
|
@@ -4746,6 +4858,8 @@ declare type Expression = {
|
|
|
4746
4858
|
"transform_keys": TransformFunc;
|
|
4747
4859
|
} | {
|
|
4748
4860
|
"transform_values": TransformFunc;
|
|
4861
|
+
} | {
|
|
4862
|
+
"function_emits": FunctionEmits;
|
|
4749
4863
|
} | {
|
|
4750
4864
|
"json_extract": JsonExtractFunc;
|
|
4751
4865
|
} | {
|
|
@@ -4888,6 +5002,8 @@ declare type Expression = {
|
|
|
4888
5002
|
"drop_procedure": DropProcedure;
|
|
4889
5003
|
} | {
|
|
4890
5004
|
"create_sequence": CreateSequence;
|
|
5005
|
+
} | {
|
|
5006
|
+
"create_synonym": CreateSynonym;
|
|
4891
5007
|
} | {
|
|
4892
5008
|
"drop_sequence": DropSequence;
|
|
4893
5009
|
} | {
|
|
@@ -4910,6 +5026,8 @@ declare type Expression = {
|
|
|
4910
5026
|
"kill": Kill;
|
|
4911
5027
|
} | {
|
|
4912
5028
|
"execute": ExecuteStatement;
|
|
5029
|
+
} | {
|
|
5030
|
+
"create_task": CreateTask;
|
|
4913
5031
|
} | {
|
|
4914
5032
|
"raw": Raw;
|
|
4915
5033
|
} | {
|
|
@@ -4990,6 +5108,8 @@ declare type Expression = {
|
|
|
4990
5108
|
"character_set_column_constraint": CharacterSetColumnConstraint;
|
|
4991
5109
|
} | {
|
|
4992
5110
|
"check_column_constraint": CheckColumnConstraint;
|
|
5111
|
+
} | {
|
|
5112
|
+
"assume_column_constraint": AssumeColumnConstraint;
|
|
4993
5113
|
} | {
|
|
4994
5114
|
"compress_column_constraint": CompressColumnConstraint;
|
|
4995
5115
|
} | {
|
|
@@ -6341,6 +6461,21 @@ declare type FunctionBody = {
|
|
|
6341
6461
|
};
|
|
6342
6462
|
};
|
|
6343
6463
|
|
|
6464
|
+
/**
|
|
6465
|
+
* Function call with EMITS clause (Exasol)
|
|
6466
|
+
* Used for JSON_EXTRACT(...) EMITS (col1 TYPE1, col2 TYPE2)
|
|
6467
|
+
*/
|
|
6468
|
+
declare type FunctionEmits = {
|
|
6469
|
+
/**
|
|
6470
|
+
* The function call expression
|
|
6471
|
+
*/
|
|
6472
|
+
this: Expression;
|
|
6473
|
+
/**
|
|
6474
|
+
* The EMITS schema definition
|
|
6475
|
+
*/
|
|
6476
|
+
emits: Expression;
|
|
6477
|
+
};
|
|
6478
|
+
|
|
6344
6479
|
/**
|
|
6345
6480
|
* Union of all function-related expression types
|
|
6346
6481
|
*/
|
|
@@ -6363,7 +6498,7 @@ declare type FunctionParameter = {
|
|
|
6363
6498
|
/**
|
|
6364
6499
|
* Types of properties in CREATE FUNCTION for tracking their original order
|
|
6365
6500
|
*/
|
|
6366
|
-
declare type FunctionPropertyKind = "Set" | "As" | "Language" | "Determinism" | "NullInput" | "Security" | "SqlDataAccess" | "Options" | "Environment";
|
|
6501
|
+
declare type FunctionPropertyKind = "Set" | "As" | "Language" | "Determinism" | "NullInput" | "Security" | "SqlDataAccess" | "Options" | "Environment" | "Handler" | "ParameterStyle";
|
|
6367
6502
|
|
|
6368
6503
|
/**
|
|
6369
6504
|
* Function security (DEFINER, INVOKER, or NONE)
|
|
@@ -6777,6 +6912,10 @@ declare type GrantPrincipal = {
|
|
|
6777
6912
|
* Whether prefixed with GROUP keyword (Redshift)
|
|
6778
6913
|
*/
|
|
6779
6914
|
is_group: boolean;
|
|
6915
|
+
/**
|
|
6916
|
+
* Whether prefixed with SHARE keyword (Snowflake)
|
|
6917
|
+
*/
|
|
6918
|
+
is_share: boolean;
|
|
6780
6919
|
};
|
|
6781
6920
|
|
|
6782
6921
|
/**
|
|
@@ -12508,6 +12647,11 @@ declare type TableConstraint = {
|
|
|
12508
12647
|
expression: Expression;
|
|
12509
12648
|
modifiers: ConstraintModifiers;
|
|
12510
12649
|
};
|
|
12650
|
+
} | {
|
|
12651
|
+
"Assume": {
|
|
12652
|
+
name: Identifier | null;
|
|
12653
|
+
expression: Expression;
|
|
12654
|
+
};
|
|
12511
12655
|
} | {
|
|
12512
12656
|
"Index": {
|
|
12513
12657
|
name: Identifier | null;
|
|
@@ -12657,6 +12801,10 @@ declare type TableRef = {
|
|
|
12657
12801
|
* Column aliases for table alias: AS t(c1, c2)
|
|
12658
12802
|
*/
|
|
12659
12803
|
column_aliases: Array<Identifier>;
|
|
12804
|
+
/**
|
|
12805
|
+
* Leading comments that appeared before this table reference in a FROM clause
|
|
12806
|
+
*/
|
|
12807
|
+
leading_comments?: Array<string>;
|
|
12660
12808
|
/**
|
|
12661
12809
|
* Trailing comments that appeared after this table reference
|
|
12662
12810
|
*/
|
|
@@ -13998,6 +14146,10 @@ declare type ValueFunc = {
|
|
|
13998
14146
|
* None = not specified, Some(true) = IGNORE NULLS, Some(false) = RESPECT NULLS
|
|
13999
14147
|
*/
|
|
14000
14148
|
ignore_nulls?: boolean | null;
|
|
14149
|
+
/**
|
|
14150
|
+
* ORDER BY inside the function parens (e.g., DuckDB: LAST_VALUE(x ORDER BY x))
|
|
14151
|
+
*/
|
|
14152
|
+
order_by?: Array<Ordered>;
|
|
14001
14153
|
};
|
|
14002
14154
|
|
|
14003
14155
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -313,6 +313,10 @@ declare type AlterTable = {
|
|
|
313
313
|
* ClickHouse: ON CLUSTER clause for distributed DDL
|
|
314
314
|
*/
|
|
315
315
|
on_cluster?: OnCluster | null;
|
|
316
|
+
/**
|
|
317
|
+
* Snowflake: ALTER ICEBERG TABLE
|
|
318
|
+
*/
|
|
319
|
+
table_modifier?: string | null;
|
|
316
320
|
};
|
|
317
321
|
|
|
318
322
|
/**
|
|
@@ -884,6 +888,13 @@ declare type ArrayTransformFunc = {
|
|
|
884
888
|
transform: Expression;
|
|
885
889
|
};
|
|
886
890
|
|
|
891
|
+
/**
|
|
892
|
+
* AssumeColumnConstraint (ClickHouse ASSUME constraint)
|
|
893
|
+
*/
|
|
894
|
+
declare type AssumeColumnConstraint = {
|
|
895
|
+
this: Expression;
|
|
896
|
+
};
|
|
897
|
+
|
|
887
898
|
export declare namespace ast {
|
|
888
899
|
export {
|
|
889
900
|
ExpressionByKey,
|
|
@@ -2268,6 +2279,10 @@ declare type CreateFunction = {
|
|
|
2268
2279
|
return_type: DataType | null;
|
|
2269
2280
|
body: FunctionBody | null;
|
|
2270
2281
|
or_replace: boolean;
|
|
2282
|
+
/**
|
|
2283
|
+
* TSQL: CREATE OR ALTER
|
|
2284
|
+
*/
|
|
2285
|
+
or_alter?: boolean;
|
|
2271
2286
|
if_not_exists: boolean;
|
|
2272
2287
|
temporary: boolean;
|
|
2273
2288
|
language: string | null;
|
|
@@ -2314,6 +2329,14 @@ declare type CreateFunction = {
|
|
|
2314
2329
|
* Databricks: ENVIRONMENT (dependencies = '...', environment_version = '...')
|
|
2315
2330
|
*/
|
|
2316
2331
|
environment?: Array<Expression>;
|
|
2332
|
+
/**
|
|
2333
|
+
* HANDLER 'handler_function' clause (Databricks)
|
|
2334
|
+
*/
|
|
2335
|
+
handler?: string | null;
|
|
2336
|
+
/**
|
|
2337
|
+
* PARAMETER STYLE clause (e.g., PANDAS for Databricks)
|
|
2338
|
+
*/
|
|
2339
|
+
parameter_style?: string | null;
|
|
2317
2340
|
};
|
|
2318
2341
|
|
|
2319
2342
|
/**
|
|
@@ -2360,6 +2383,10 @@ declare type CreateProcedure = {
|
|
|
2360
2383
|
parameters: Array<FunctionParameter>;
|
|
2361
2384
|
body: FunctionBody | null;
|
|
2362
2385
|
or_replace: boolean;
|
|
2386
|
+
/**
|
|
2387
|
+
* TSQL: CREATE OR ALTER
|
|
2388
|
+
*/
|
|
2389
|
+
or_alter?: boolean;
|
|
2363
2390
|
if_not_exists: boolean;
|
|
2364
2391
|
language: string | null;
|
|
2365
2392
|
security: FunctionSecurity | null;
|
|
@@ -2389,10 +2416,16 @@ declare type CreateProcedure = {
|
|
|
2389
2416
|
* CREATE SCHEMA statement
|
|
2390
2417
|
*/
|
|
2391
2418
|
declare type CreateSchema = {
|
|
2392
|
-
|
|
2419
|
+
/**
|
|
2420
|
+
* Schema name parts, possibly dot-qualified (e.g. [mydb, hr] for "mydb.hr")
|
|
2421
|
+
*/
|
|
2422
|
+
name: Array<Identifier>;
|
|
2393
2423
|
if_not_exists: boolean;
|
|
2394
2424
|
authorization: Identifier | null;
|
|
2395
|
-
|
|
2425
|
+
/**
|
|
2426
|
+
* CLONE source parts, possibly dot-qualified
|
|
2427
|
+
*/
|
|
2428
|
+
clone_from: Array<Identifier> | null;
|
|
2396
2429
|
/**
|
|
2397
2430
|
* AT/BEFORE clause for time travel (Snowflake)
|
|
2398
2431
|
*/
|
|
@@ -2456,6 +2489,20 @@ declare type CreateSequence = {
|
|
|
2456
2489
|
property_order: Array<SeqPropKind>;
|
|
2457
2490
|
};
|
|
2458
2491
|
|
|
2492
|
+
/**
|
|
2493
|
+
* CREATE SYNONYM statement (TSQL)
|
|
2494
|
+
*/
|
|
2495
|
+
declare type CreateSynonym = {
|
|
2496
|
+
/**
|
|
2497
|
+
* The synonym name (can be qualified: schema.synonym_name)
|
|
2498
|
+
*/
|
|
2499
|
+
name: TableRef;
|
|
2500
|
+
/**
|
|
2501
|
+
* The target object the synonym refers to
|
|
2502
|
+
*/
|
|
2503
|
+
target: TableRef;
|
|
2504
|
+
};
|
|
2505
|
+
|
|
2459
2506
|
/**
|
|
2460
2507
|
* CREATE TABLE statement
|
|
2461
2508
|
*/
|
|
@@ -2563,6 +2610,30 @@ declare type CreateTable = {
|
|
|
2563
2610
|
* StarRocks: ROLLUP (r1(col1, col2), r2(col1))
|
|
2564
2611
|
*/
|
|
2565
2612
|
rollup?: RollupProperty | null;
|
|
2613
|
+
/**
|
|
2614
|
+
* ClickHouse: UUID 'xxx' clause after table name
|
|
2615
|
+
*/
|
|
2616
|
+
uuid?: string | null;
|
|
2617
|
+
};
|
|
2618
|
+
|
|
2619
|
+
/**
|
|
2620
|
+
* Snowflake CREATE TASK statement
|
|
2621
|
+
*/
|
|
2622
|
+
declare type CreateTask = {
|
|
2623
|
+
or_replace: boolean;
|
|
2624
|
+
if_not_exists: boolean;
|
|
2625
|
+
/**
|
|
2626
|
+
* Task name (possibly qualified: db.schema.task)
|
|
2627
|
+
*/
|
|
2628
|
+
name: string;
|
|
2629
|
+
/**
|
|
2630
|
+
* Raw text of properties between name and AS (WAREHOUSE, SCHEDULE, etc.)
|
|
2631
|
+
*/
|
|
2632
|
+
properties: string;
|
|
2633
|
+
/**
|
|
2634
|
+
* The SQL statement body after AS
|
|
2635
|
+
*/
|
|
2636
|
+
body: Expression;
|
|
2566
2637
|
};
|
|
2567
2638
|
|
|
2568
2639
|
/**
|
|
@@ -2581,6 +2652,10 @@ declare type CreateTrigger = {
|
|
|
2581
2652
|
when_paren?: boolean;
|
|
2582
2653
|
body: TriggerBody;
|
|
2583
2654
|
or_replace: boolean;
|
|
2655
|
+
/**
|
|
2656
|
+
* TSQL: CREATE OR ALTER
|
|
2657
|
+
*/
|
|
2658
|
+
or_alter?: boolean;
|
|
2584
2659
|
constraint: boolean;
|
|
2585
2660
|
deferrable: boolean | null;
|
|
2586
2661
|
initially_deferred: boolean | null;
|
|
@@ -2604,6 +2679,10 @@ declare type CreateView = {
|
|
|
2604
2679
|
columns: Array<ViewColumn>;
|
|
2605
2680
|
query: Expression;
|
|
2606
2681
|
or_replace: boolean;
|
|
2682
|
+
/**
|
|
2683
|
+
* TSQL: CREATE OR ALTER
|
|
2684
|
+
*/
|
|
2685
|
+
or_alter?: boolean;
|
|
2607
2686
|
if_not_exists: boolean;
|
|
2608
2687
|
materialized: boolean;
|
|
2609
2688
|
temporary: boolean;
|
|
@@ -2627,6 +2706,10 @@ declare type CreateView = {
|
|
|
2627
2706
|
* True for MySQL-style "SQL SECURITY", false for Presto-style "SECURITY"
|
|
2628
2707
|
*/
|
|
2629
2708
|
security_sql_style: boolean;
|
|
2709
|
+
/**
|
|
2710
|
+
* True when SQL SECURITY appears after the view name (not before VIEW keyword)
|
|
2711
|
+
*/
|
|
2712
|
+
security_after_name: boolean;
|
|
2630
2713
|
/**
|
|
2631
2714
|
* Whether the query was parenthesized: AS (SELECT ...)
|
|
2632
2715
|
*/
|
|
@@ -3151,6 +3234,7 @@ declare type DDLExpression = ExpressionByType<'create_table'> | ExpressionByType
|
|
|
3151
3234
|
*/
|
|
3152
3235
|
declare type Declare = {
|
|
3153
3236
|
expressions: Array<Expression>;
|
|
3237
|
+
replace: boolean;
|
|
3154
3238
|
};
|
|
3155
3239
|
|
|
3156
3240
|
/**
|
|
@@ -3251,6 +3335,10 @@ export default _default;
|
|
|
3251
3335
|
*/
|
|
3252
3336
|
declare type DefaultColumnConstraint = {
|
|
3253
3337
|
this: Expression;
|
|
3338
|
+
/**
|
|
3339
|
+
* TSQL: DEFAULT value FOR column (table-level default constraint)
|
|
3340
|
+
*/
|
|
3341
|
+
for_column?: Identifier | null;
|
|
3254
3342
|
};
|
|
3255
3343
|
|
|
3256
3344
|
/**
|
|
@@ -3619,6 +3707,10 @@ declare type DPipe = {
|
|
|
3619
3707
|
declare type DropDatabase = {
|
|
3620
3708
|
name: Identifier;
|
|
3621
3709
|
if_exists: boolean;
|
|
3710
|
+
/**
|
|
3711
|
+
* ClickHouse: SYNC modifier
|
|
3712
|
+
*/
|
|
3713
|
+
sync: boolean;
|
|
3622
3714
|
};
|
|
3623
3715
|
|
|
3624
3716
|
/**
|
|
@@ -3713,6 +3805,18 @@ declare type DropTable = {
|
|
|
3713
3805
|
* When set, TSQL generator outputs IF NOT OBJECT_ID(...) IS NULL BEGIN DROP TABLE ...; END
|
|
3714
3806
|
*/
|
|
3715
3807
|
object_id_args?: string | null;
|
|
3808
|
+
/**
|
|
3809
|
+
* ClickHouse: SYNC modifier
|
|
3810
|
+
*/
|
|
3811
|
+
sync: boolean;
|
|
3812
|
+
/**
|
|
3813
|
+
* Snowflake: DROP ICEBERG TABLE
|
|
3814
|
+
*/
|
|
3815
|
+
iceberg: boolean;
|
|
3816
|
+
/**
|
|
3817
|
+
* RESTRICT modifier (opposite of CASCADE)
|
|
3818
|
+
*/
|
|
3819
|
+
restrict: boolean;
|
|
3716
3820
|
};
|
|
3717
3821
|
|
|
3718
3822
|
/**
|
|
@@ -3966,6 +4070,10 @@ declare type ExecuteParameter = {
|
|
|
3966
4070
|
* Whether this is a positional parameter (no = sign)
|
|
3967
4071
|
*/
|
|
3968
4072
|
positional?: boolean;
|
|
4073
|
+
/**
|
|
4074
|
+
* TSQL OUTPUT modifier on parameter
|
|
4075
|
+
*/
|
|
4076
|
+
output?: boolean;
|
|
3969
4077
|
};
|
|
3970
4078
|
|
|
3971
4079
|
/**
|
|
@@ -3981,6 +4089,10 @@ declare type ExecuteStatement = {
|
|
|
3981
4089
|
* Named parameters: @param=value pairs
|
|
3982
4090
|
*/
|
|
3983
4091
|
parameters: Array<ExecuteParameter>;
|
|
4092
|
+
/**
|
|
4093
|
+
* Trailing clause text (e.g. WITH RESULT SETS ((...)))
|
|
4094
|
+
*/
|
|
4095
|
+
suffix?: string | null;
|
|
3984
4096
|
};
|
|
3985
4097
|
|
|
3986
4098
|
/**
|
|
@@ -4746,6 +4858,8 @@ declare type Expression = {
|
|
|
4746
4858
|
"transform_keys": TransformFunc;
|
|
4747
4859
|
} | {
|
|
4748
4860
|
"transform_values": TransformFunc;
|
|
4861
|
+
} | {
|
|
4862
|
+
"function_emits": FunctionEmits;
|
|
4749
4863
|
} | {
|
|
4750
4864
|
"json_extract": JsonExtractFunc;
|
|
4751
4865
|
} | {
|
|
@@ -4888,6 +5002,8 @@ declare type Expression = {
|
|
|
4888
5002
|
"drop_procedure": DropProcedure;
|
|
4889
5003
|
} | {
|
|
4890
5004
|
"create_sequence": CreateSequence;
|
|
5005
|
+
} | {
|
|
5006
|
+
"create_synonym": CreateSynonym;
|
|
4891
5007
|
} | {
|
|
4892
5008
|
"drop_sequence": DropSequence;
|
|
4893
5009
|
} | {
|
|
@@ -4910,6 +5026,8 @@ declare type Expression = {
|
|
|
4910
5026
|
"kill": Kill;
|
|
4911
5027
|
} | {
|
|
4912
5028
|
"execute": ExecuteStatement;
|
|
5029
|
+
} | {
|
|
5030
|
+
"create_task": CreateTask;
|
|
4913
5031
|
} | {
|
|
4914
5032
|
"raw": Raw;
|
|
4915
5033
|
} | {
|
|
@@ -4990,6 +5108,8 @@ declare type Expression = {
|
|
|
4990
5108
|
"character_set_column_constraint": CharacterSetColumnConstraint;
|
|
4991
5109
|
} | {
|
|
4992
5110
|
"check_column_constraint": CheckColumnConstraint;
|
|
5111
|
+
} | {
|
|
5112
|
+
"assume_column_constraint": AssumeColumnConstraint;
|
|
4993
5113
|
} | {
|
|
4994
5114
|
"compress_column_constraint": CompressColumnConstraint;
|
|
4995
5115
|
} | {
|
|
@@ -6341,6 +6461,21 @@ declare type FunctionBody = {
|
|
|
6341
6461
|
};
|
|
6342
6462
|
};
|
|
6343
6463
|
|
|
6464
|
+
/**
|
|
6465
|
+
* Function call with EMITS clause (Exasol)
|
|
6466
|
+
* Used for JSON_EXTRACT(...) EMITS (col1 TYPE1, col2 TYPE2)
|
|
6467
|
+
*/
|
|
6468
|
+
declare type FunctionEmits = {
|
|
6469
|
+
/**
|
|
6470
|
+
* The function call expression
|
|
6471
|
+
*/
|
|
6472
|
+
this: Expression;
|
|
6473
|
+
/**
|
|
6474
|
+
* The EMITS schema definition
|
|
6475
|
+
*/
|
|
6476
|
+
emits: Expression;
|
|
6477
|
+
};
|
|
6478
|
+
|
|
6344
6479
|
/**
|
|
6345
6480
|
* Union of all function-related expression types
|
|
6346
6481
|
*/
|
|
@@ -6363,7 +6498,7 @@ declare type FunctionParameter = {
|
|
|
6363
6498
|
/**
|
|
6364
6499
|
* Types of properties in CREATE FUNCTION for tracking their original order
|
|
6365
6500
|
*/
|
|
6366
|
-
declare type FunctionPropertyKind = "Set" | "As" | "Language" | "Determinism" | "NullInput" | "Security" | "SqlDataAccess" | "Options" | "Environment";
|
|
6501
|
+
declare type FunctionPropertyKind = "Set" | "As" | "Language" | "Determinism" | "NullInput" | "Security" | "SqlDataAccess" | "Options" | "Environment" | "Handler" | "ParameterStyle";
|
|
6367
6502
|
|
|
6368
6503
|
/**
|
|
6369
6504
|
* Function security (DEFINER, INVOKER, or NONE)
|
|
@@ -6777,6 +6912,10 @@ declare type GrantPrincipal = {
|
|
|
6777
6912
|
* Whether prefixed with GROUP keyword (Redshift)
|
|
6778
6913
|
*/
|
|
6779
6914
|
is_group: boolean;
|
|
6915
|
+
/**
|
|
6916
|
+
* Whether prefixed with SHARE keyword (Snowflake)
|
|
6917
|
+
*/
|
|
6918
|
+
is_share: boolean;
|
|
6780
6919
|
};
|
|
6781
6920
|
|
|
6782
6921
|
/**
|
|
@@ -12508,6 +12647,11 @@ declare type TableConstraint = {
|
|
|
12508
12647
|
expression: Expression;
|
|
12509
12648
|
modifiers: ConstraintModifiers;
|
|
12510
12649
|
};
|
|
12650
|
+
} | {
|
|
12651
|
+
"Assume": {
|
|
12652
|
+
name: Identifier | null;
|
|
12653
|
+
expression: Expression;
|
|
12654
|
+
};
|
|
12511
12655
|
} | {
|
|
12512
12656
|
"Index": {
|
|
12513
12657
|
name: Identifier | null;
|
|
@@ -12657,6 +12801,10 @@ declare type TableRef = {
|
|
|
12657
12801
|
* Column aliases for table alias: AS t(c1, c2)
|
|
12658
12802
|
*/
|
|
12659
12803
|
column_aliases: Array<Identifier>;
|
|
12804
|
+
/**
|
|
12805
|
+
* Leading comments that appeared before this table reference in a FROM clause
|
|
12806
|
+
*/
|
|
12807
|
+
leading_comments?: Array<string>;
|
|
12660
12808
|
/**
|
|
12661
12809
|
* Trailing comments that appeared after this table reference
|
|
12662
12810
|
*/
|
|
@@ -13998,6 +14146,10 @@ declare type ValueFunc = {
|
|
|
13998
14146
|
* None = not specified, Some(true) = IGNORE NULLS, Some(false) = RESPECT NULLS
|
|
13999
14147
|
*/
|
|
14000
14148
|
ignore_nulls?: boolean | null;
|
|
14149
|
+
/**
|
|
14150
|
+
* ORDER BY inside the function parens (e.g., DuckDB: LAST_VALUE(x ORDER BY x))
|
|
14151
|
+
*/
|
|
14152
|
+
order_by?: Array<Ordered>;
|
|
14001
14153
|
};
|
|
14002
14154
|
|
|
14003
14155
|
/**
|
|
Binary file
|