@polyglot-sql/sdk 0.1.12 → 0.1.14
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 +1729 -1729
- package/dist/index.d.cts +52 -3
- package/dist/index.d.ts +52 -3
- package/dist/polyglot_sql_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2210,6 +2210,10 @@ declare type CountFunc = {
|
|
|
2210
2210
|
* Original function name for case preservation (e.g., "count" or "COUNT")
|
|
2211
2211
|
*/
|
|
2212
2212
|
original_name?: string | null;
|
|
2213
|
+
/**
|
|
2214
|
+
* Inferred data type from type annotation
|
|
2215
|
+
*/
|
|
2216
|
+
inferred_type?: DataType | null;
|
|
2213
2217
|
};
|
|
2214
2218
|
|
|
2215
2219
|
/**
|
|
@@ -2569,8 +2573,12 @@ declare type CreateTrigger = {
|
|
|
2569
2573
|
table: TableRef;
|
|
2570
2574
|
timing: TriggerTiming;
|
|
2571
2575
|
events: Array<TriggerEvent>;
|
|
2572
|
-
for_each
|
|
2576
|
+
for_each?: TriggerForEach | null;
|
|
2573
2577
|
when: Expression | null;
|
|
2578
|
+
/**
|
|
2579
|
+
* Whether the WHEN clause was parenthesized in the original SQL
|
|
2580
|
+
*/
|
|
2581
|
+
when_paren?: boolean;
|
|
2574
2582
|
body: TriggerBody;
|
|
2575
2583
|
or_replace: boolean;
|
|
2576
2584
|
constraint: boolean;
|
|
@@ -3700,6 +3708,11 @@ declare type DropTable = {
|
|
|
3700
3708
|
* Comments that appear before the DROP keyword (e.g., leading line comments)
|
|
3701
3709
|
*/
|
|
3702
3710
|
leading_comments: Array<string>;
|
|
3711
|
+
/**
|
|
3712
|
+
* TSQL: OBJECT_ID arguments for reconstructing IF OBJECT_ID(...) IS NOT NULL pattern
|
|
3713
|
+
* When set, TSQL generator outputs IF NOT OBJECT_ID(...) IS NULL BEGIN DROP TABLE ...; END
|
|
3714
|
+
*/
|
|
3715
|
+
object_id_args?: string | null;
|
|
3703
3716
|
};
|
|
3704
3717
|
|
|
3705
3718
|
/**
|
|
@@ -3949,6 +3962,10 @@ declare type ExecuteParameter = {
|
|
|
3949
3962
|
* Parameter value
|
|
3950
3963
|
*/
|
|
3951
3964
|
value: Expression;
|
|
3965
|
+
/**
|
|
3966
|
+
* Whether this is a positional parameter (no = sign)
|
|
3967
|
+
*/
|
|
3968
|
+
positional?: boolean;
|
|
3952
3969
|
};
|
|
3953
3970
|
|
|
3954
3971
|
/**
|
|
@@ -6821,6 +6838,10 @@ declare type GroupConcatFunc = {
|
|
|
6821
6838
|
order_by: Array<Ordered> | null;
|
|
6822
6839
|
distinct: boolean;
|
|
6823
6840
|
filter: Expression | null;
|
|
6841
|
+
/**
|
|
6842
|
+
* Inferred data type from type annotation
|
|
6843
|
+
*/
|
|
6844
|
+
inferred_type?: DataType | null;
|
|
6824
6845
|
};
|
|
6825
6846
|
|
|
6826
6847
|
/**
|
|
@@ -7000,6 +7021,10 @@ declare type IfFunc = {
|
|
|
7000
7021
|
* Original function name (IF, IFF, IIF) for round-trip preservation
|
|
7001
7022
|
*/
|
|
7002
7023
|
original_name?: string | null;
|
|
7024
|
+
/**
|
|
7025
|
+
* Inferred data type from type annotation
|
|
7026
|
+
*/
|
|
7027
|
+
inferred_type?: DataType | null;
|
|
7003
7028
|
};
|
|
7004
7029
|
|
|
7005
7030
|
export declare function ifNull(expr: ExprInput, fallback: ExprInput): Expr;
|
|
@@ -8027,7 +8052,7 @@ declare type JoinHint = {
|
|
|
8027
8052
|
* CROSS/OUTER APPLY (TSQL), ASOF joins (DuckDB/Snowflake), ARRAY joins
|
|
8028
8053
|
* (ClickHouse), STRAIGHT_JOIN (MySQL), and implicit comma-joins.
|
|
8029
8054
|
*/
|
|
8030
|
-
declare type JoinKind = "Inner" | "Left" | "Right" | "Full" | "Outer" | "Cross" | "Natural" | "NaturalLeft" | "NaturalRight" | "NaturalFull" | "Semi" | "Anti" | "LeftSemi" | "LeftAnti" | "RightSemi" | "RightAnti" | "CrossApply" | "OuterApply" | "AsOf" | "AsOfLeft" | "AsOfRight" | "Lateral" | "LeftLateral" | "Straight" | "Implicit" | "Array" | "LeftArray" | "Paste";
|
|
8055
|
+
declare type JoinKind = "Inner" | "Left" | "Right" | "Full" | "Outer" | "Cross" | "Natural" | "NaturalLeft" | "NaturalRight" | "NaturalFull" | "Semi" | "Anti" | "LeftSemi" | "LeftAnti" | "RightSemi" | "RightAnti" | "CrossApply" | "OuterApply" | "AsOf" | "AsOfLeft" | "AsOfRight" | "Lateral" | "LeftLateral" | "Straight" | "Implicit" | "Array" | "LeftArray" | "Paste" | "Positional";
|
|
8031
8056
|
|
|
8032
8057
|
/**
|
|
8033
8058
|
* JournalProperty
|
|
@@ -8603,7 +8628,10 @@ declare type LeadLagFunc = {
|
|
|
8603
8628
|
this: Expression;
|
|
8604
8629
|
offset: Expression | null;
|
|
8605
8630
|
default: Expression | null;
|
|
8606
|
-
|
|
8631
|
+
/**
|
|
8632
|
+
* None = not specified, Some(true) = IGNORE NULLS, Some(false) = RESPECT NULLS
|
|
8633
|
+
*/
|
|
8634
|
+
ignore_nulls?: boolean | null;
|
|
8607
8635
|
};
|
|
8608
8636
|
|
|
8609
8637
|
export declare function least(...exprs: ExprInput[]): Expr;
|
|
@@ -8760,6 +8788,10 @@ declare type ListAggFunc = {
|
|
|
8760
8788
|
order_by: Array<Ordered> | null;
|
|
8761
8789
|
distinct: boolean;
|
|
8762
8790
|
filter: Expression | null;
|
|
8791
|
+
/**
|
|
8792
|
+
* Inferred data type from type annotation
|
|
8793
|
+
*/
|
|
8794
|
+
inferred_type?: DataType | null;
|
|
8763
8795
|
};
|
|
8764
8796
|
|
|
8765
8797
|
/**
|
|
@@ -9486,6 +9518,10 @@ declare type Nvl2Func = {
|
|
|
9486
9518
|
this: Expression;
|
|
9487
9519
|
true_value: Expression;
|
|
9488
9520
|
false_value: Expression;
|
|
9521
|
+
/**
|
|
9522
|
+
* Inferred data type from type annotation
|
|
9523
|
+
*/
|
|
9524
|
+
inferred_type?: DataType | null;
|
|
9489
9525
|
};
|
|
9490
9526
|
|
|
9491
9527
|
/**
|
|
@@ -11452,6 +11488,11 @@ declare type Select = {
|
|
|
11452
11488
|
* TSQL OPTION clause (e.g., OPTION(LABEL = 'foo'))
|
|
11453
11489
|
*/
|
|
11454
11490
|
option?: string | null;
|
|
11491
|
+
/**
|
|
11492
|
+
* Redshift-style EXCLUDE clause at the end of the projection list
|
|
11493
|
+
* e.g., SELECT *, 4 AS col4 EXCLUDE (col2, col3) FROM ...
|
|
11494
|
+
*/
|
|
11495
|
+
exclude?: Array<Expression> | null;
|
|
11455
11496
|
};
|
|
11456
11497
|
|
|
11457
11498
|
/** Create a SelectBuilder, optionally pre-populated with columns. */
|
|
@@ -12130,6 +12171,10 @@ declare type StringAggFunc = {
|
|
|
12130
12171
|
* BigQuery LIMIT inside STRING_AGG
|
|
12131
12172
|
*/
|
|
12132
12173
|
limit?: Expression | null;
|
|
12174
|
+
/**
|
|
12175
|
+
* Inferred data type from type annotation
|
|
12176
|
+
*/
|
|
12177
|
+
inferred_type?: DataType | null;
|
|
12133
12178
|
};
|
|
12134
12179
|
|
|
12135
12180
|
/**
|
|
@@ -12360,6 +12405,10 @@ declare type SumIfFunc = {
|
|
|
12360
12405
|
this: Expression;
|
|
12361
12406
|
condition: Expression;
|
|
12362
12407
|
filter: Expression | null;
|
|
12408
|
+
/**
|
|
12409
|
+
* Inferred data type from type annotation
|
|
12410
|
+
*/
|
|
12411
|
+
inferred_type?: DataType | null;
|
|
12363
12412
|
};
|
|
12364
12413
|
|
|
12365
12414
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2210,6 +2210,10 @@ declare type CountFunc = {
|
|
|
2210
2210
|
* Original function name for case preservation (e.g., "count" or "COUNT")
|
|
2211
2211
|
*/
|
|
2212
2212
|
original_name?: string | null;
|
|
2213
|
+
/**
|
|
2214
|
+
* Inferred data type from type annotation
|
|
2215
|
+
*/
|
|
2216
|
+
inferred_type?: DataType | null;
|
|
2213
2217
|
};
|
|
2214
2218
|
|
|
2215
2219
|
/**
|
|
@@ -2569,8 +2573,12 @@ declare type CreateTrigger = {
|
|
|
2569
2573
|
table: TableRef;
|
|
2570
2574
|
timing: TriggerTiming;
|
|
2571
2575
|
events: Array<TriggerEvent>;
|
|
2572
|
-
for_each
|
|
2576
|
+
for_each?: TriggerForEach | null;
|
|
2573
2577
|
when: Expression | null;
|
|
2578
|
+
/**
|
|
2579
|
+
* Whether the WHEN clause was parenthesized in the original SQL
|
|
2580
|
+
*/
|
|
2581
|
+
when_paren?: boolean;
|
|
2574
2582
|
body: TriggerBody;
|
|
2575
2583
|
or_replace: boolean;
|
|
2576
2584
|
constraint: boolean;
|
|
@@ -3700,6 +3708,11 @@ declare type DropTable = {
|
|
|
3700
3708
|
* Comments that appear before the DROP keyword (e.g., leading line comments)
|
|
3701
3709
|
*/
|
|
3702
3710
|
leading_comments: Array<string>;
|
|
3711
|
+
/**
|
|
3712
|
+
* TSQL: OBJECT_ID arguments for reconstructing IF OBJECT_ID(...) IS NOT NULL pattern
|
|
3713
|
+
* When set, TSQL generator outputs IF NOT OBJECT_ID(...) IS NULL BEGIN DROP TABLE ...; END
|
|
3714
|
+
*/
|
|
3715
|
+
object_id_args?: string | null;
|
|
3703
3716
|
};
|
|
3704
3717
|
|
|
3705
3718
|
/**
|
|
@@ -3949,6 +3962,10 @@ declare type ExecuteParameter = {
|
|
|
3949
3962
|
* Parameter value
|
|
3950
3963
|
*/
|
|
3951
3964
|
value: Expression;
|
|
3965
|
+
/**
|
|
3966
|
+
* Whether this is a positional parameter (no = sign)
|
|
3967
|
+
*/
|
|
3968
|
+
positional?: boolean;
|
|
3952
3969
|
};
|
|
3953
3970
|
|
|
3954
3971
|
/**
|
|
@@ -6821,6 +6838,10 @@ declare type GroupConcatFunc = {
|
|
|
6821
6838
|
order_by: Array<Ordered> | null;
|
|
6822
6839
|
distinct: boolean;
|
|
6823
6840
|
filter: Expression | null;
|
|
6841
|
+
/**
|
|
6842
|
+
* Inferred data type from type annotation
|
|
6843
|
+
*/
|
|
6844
|
+
inferred_type?: DataType | null;
|
|
6824
6845
|
};
|
|
6825
6846
|
|
|
6826
6847
|
/**
|
|
@@ -7000,6 +7021,10 @@ declare type IfFunc = {
|
|
|
7000
7021
|
* Original function name (IF, IFF, IIF) for round-trip preservation
|
|
7001
7022
|
*/
|
|
7002
7023
|
original_name?: string | null;
|
|
7024
|
+
/**
|
|
7025
|
+
* Inferred data type from type annotation
|
|
7026
|
+
*/
|
|
7027
|
+
inferred_type?: DataType | null;
|
|
7003
7028
|
};
|
|
7004
7029
|
|
|
7005
7030
|
export declare function ifNull(expr: ExprInput, fallback: ExprInput): Expr;
|
|
@@ -8027,7 +8052,7 @@ declare type JoinHint = {
|
|
|
8027
8052
|
* CROSS/OUTER APPLY (TSQL), ASOF joins (DuckDB/Snowflake), ARRAY joins
|
|
8028
8053
|
* (ClickHouse), STRAIGHT_JOIN (MySQL), and implicit comma-joins.
|
|
8029
8054
|
*/
|
|
8030
|
-
declare type JoinKind = "Inner" | "Left" | "Right" | "Full" | "Outer" | "Cross" | "Natural" | "NaturalLeft" | "NaturalRight" | "NaturalFull" | "Semi" | "Anti" | "LeftSemi" | "LeftAnti" | "RightSemi" | "RightAnti" | "CrossApply" | "OuterApply" | "AsOf" | "AsOfLeft" | "AsOfRight" | "Lateral" | "LeftLateral" | "Straight" | "Implicit" | "Array" | "LeftArray" | "Paste";
|
|
8055
|
+
declare type JoinKind = "Inner" | "Left" | "Right" | "Full" | "Outer" | "Cross" | "Natural" | "NaturalLeft" | "NaturalRight" | "NaturalFull" | "Semi" | "Anti" | "LeftSemi" | "LeftAnti" | "RightSemi" | "RightAnti" | "CrossApply" | "OuterApply" | "AsOf" | "AsOfLeft" | "AsOfRight" | "Lateral" | "LeftLateral" | "Straight" | "Implicit" | "Array" | "LeftArray" | "Paste" | "Positional";
|
|
8031
8056
|
|
|
8032
8057
|
/**
|
|
8033
8058
|
* JournalProperty
|
|
@@ -8603,7 +8628,10 @@ declare type LeadLagFunc = {
|
|
|
8603
8628
|
this: Expression;
|
|
8604
8629
|
offset: Expression | null;
|
|
8605
8630
|
default: Expression | null;
|
|
8606
|
-
|
|
8631
|
+
/**
|
|
8632
|
+
* None = not specified, Some(true) = IGNORE NULLS, Some(false) = RESPECT NULLS
|
|
8633
|
+
*/
|
|
8634
|
+
ignore_nulls?: boolean | null;
|
|
8607
8635
|
};
|
|
8608
8636
|
|
|
8609
8637
|
export declare function least(...exprs: ExprInput[]): Expr;
|
|
@@ -8760,6 +8788,10 @@ declare type ListAggFunc = {
|
|
|
8760
8788
|
order_by: Array<Ordered> | null;
|
|
8761
8789
|
distinct: boolean;
|
|
8762
8790
|
filter: Expression | null;
|
|
8791
|
+
/**
|
|
8792
|
+
* Inferred data type from type annotation
|
|
8793
|
+
*/
|
|
8794
|
+
inferred_type?: DataType | null;
|
|
8763
8795
|
};
|
|
8764
8796
|
|
|
8765
8797
|
/**
|
|
@@ -9486,6 +9518,10 @@ declare type Nvl2Func = {
|
|
|
9486
9518
|
this: Expression;
|
|
9487
9519
|
true_value: Expression;
|
|
9488
9520
|
false_value: Expression;
|
|
9521
|
+
/**
|
|
9522
|
+
* Inferred data type from type annotation
|
|
9523
|
+
*/
|
|
9524
|
+
inferred_type?: DataType | null;
|
|
9489
9525
|
};
|
|
9490
9526
|
|
|
9491
9527
|
/**
|
|
@@ -11452,6 +11488,11 @@ declare type Select = {
|
|
|
11452
11488
|
* TSQL OPTION clause (e.g., OPTION(LABEL = 'foo'))
|
|
11453
11489
|
*/
|
|
11454
11490
|
option?: string | null;
|
|
11491
|
+
/**
|
|
11492
|
+
* Redshift-style EXCLUDE clause at the end of the projection list
|
|
11493
|
+
* e.g., SELECT *, 4 AS col4 EXCLUDE (col2, col3) FROM ...
|
|
11494
|
+
*/
|
|
11495
|
+
exclude?: Array<Expression> | null;
|
|
11455
11496
|
};
|
|
11456
11497
|
|
|
11457
11498
|
/** Create a SelectBuilder, optionally pre-populated with columns. */
|
|
@@ -12130,6 +12171,10 @@ declare type StringAggFunc = {
|
|
|
12130
12171
|
* BigQuery LIMIT inside STRING_AGG
|
|
12131
12172
|
*/
|
|
12132
12173
|
limit?: Expression | null;
|
|
12174
|
+
/**
|
|
12175
|
+
* Inferred data type from type annotation
|
|
12176
|
+
*/
|
|
12177
|
+
inferred_type?: DataType | null;
|
|
12133
12178
|
};
|
|
12134
12179
|
|
|
12135
12180
|
/**
|
|
@@ -12360,6 +12405,10 @@ declare type SumIfFunc = {
|
|
|
12360
12405
|
this: Expression;
|
|
12361
12406
|
condition: Expression;
|
|
12362
12407
|
filter: Expression | null;
|
|
12408
|
+
/**
|
|
12409
|
+
* Inferred data type from type annotation
|
|
12410
|
+
*/
|
|
12411
|
+
inferred_type?: DataType | null;
|
|
12363
12412
|
};
|
|
12364
12413
|
|
|
12365
12414
|
/**
|
|
Binary file
|