@polyglot-sql/sdk 0.1.13 → 0.1.15

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/index.d.cts CHANGED
@@ -2573,8 +2573,12 @@ declare type CreateTrigger = {
2573
2573
  table: TableRef;
2574
2574
  timing: TriggerTiming;
2575
2575
  events: Array<TriggerEvent>;
2576
- for_each: TriggerForEach;
2576
+ for_each?: TriggerForEach | null;
2577
2577
  when: Expression | null;
2578
+ /**
2579
+ * Whether the WHEN clause was parenthesized in the original SQL
2580
+ */
2581
+ when_paren?: boolean;
2578
2582
  body: TriggerBody;
2579
2583
  or_replace: boolean;
2580
2584
  constraint: boolean;
@@ -3704,6 +3708,11 @@ declare type DropTable = {
3704
3708
  * Comments that appear before the DROP keyword (e.g., leading line comments)
3705
3709
  */
3706
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;
3707
3716
  };
3708
3717
 
3709
3718
  /**
@@ -3953,6 +3962,10 @@ declare type ExecuteParameter = {
3953
3962
  * Parameter value
3954
3963
  */
3955
3964
  value: Expression;
3965
+ /**
3966
+ * Whether this is a positional parameter (no = sign)
3967
+ */
3968
+ positional?: boolean;
3956
3969
  };
3957
3970
 
3958
3971
  /**
@@ -8039,7 +8052,7 @@ declare type JoinHint = {
8039
8052
  * CROSS/OUTER APPLY (TSQL), ASOF joins (DuckDB/Snowflake), ARRAY joins
8040
8053
  * (ClickHouse), STRAIGHT_JOIN (MySQL), and implicit comma-joins.
8041
8054
  */
8042
- 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";
8043
8056
 
8044
8057
  /**
8045
8058
  * JournalProperty
@@ -8615,7 +8628,10 @@ declare type LeadLagFunc = {
8615
8628
  this: Expression;
8616
8629
  offset: Expression | null;
8617
8630
  default: Expression | null;
8618
- ignore_nulls: boolean;
8631
+ /**
8632
+ * None = not specified, Some(true) = IGNORE NULLS, Some(false) = RESPECT NULLS
8633
+ */
8634
+ ignore_nulls?: boolean | null;
8619
8635
  };
8620
8636
 
8621
8637
  export declare function least(...exprs: ExprInput[]): Expr;
@@ -11472,6 +11488,11 @@ declare type Select = {
11472
11488
  * TSQL OPTION clause (e.g., OPTION(LABEL = 'foo'))
11473
11489
  */
11474
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;
11475
11496
  };
11476
11497
 
11477
11498
  /** Create a SelectBuilder, optionally pre-populated with columns. */
package/dist/index.d.ts CHANGED
@@ -2573,8 +2573,12 @@ declare type CreateTrigger = {
2573
2573
  table: TableRef;
2574
2574
  timing: TriggerTiming;
2575
2575
  events: Array<TriggerEvent>;
2576
- for_each: TriggerForEach;
2576
+ for_each?: TriggerForEach | null;
2577
2577
  when: Expression | null;
2578
+ /**
2579
+ * Whether the WHEN clause was parenthesized in the original SQL
2580
+ */
2581
+ when_paren?: boolean;
2578
2582
  body: TriggerBody;
2579
2583
  or_replace: boolean;
2580
2584
  constraint: boolean;
@@ -3704,6 +3708,11 @@ declare type DropTable = {
3704
3708
  * Comments that appear before the DROP keyword (e.g., leading line comments)
3705
3709
  */
3706
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;
3707
3716
  };
3708
3717
 
3709
3718
  /**
@@ -3953,6 +3962,10 @@ declare type ExecuteParameter = {
3953
3962
  * Parameter value
3954
3963
  */
3955
3964
  value: Expression;
3965
+ /**
3966
+ * Whether this is a positional parameter (no = sign)
3967
+ */
3968
+ positional?: boolean;
3956
3969
  };
3957
3970
 
3958
3971
  /**
@@ -8039,7 +8052,7 @@ declare type JoinHint = {
8039
8052
  * CROSS/OUTER APPLY (TSQL), ASOF joins (DuckDB/Snowflake), ARRAY joins
8040
8053
  * (ClickHouse), STRAIGHT_JOIN (MySQL), and implicit comma-joins.
8041
8054
  */
8042
- 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";
8043
8056
 
8044
8057
  /**
8045
8058
  * JournalProperty
@@ -8615,7 +8628,10 @@ declare type LeadLagFunc = {
8615
8628
  this: Expression;
8616
8629
  offset: Expression | null;
8617
8630
  default: Expression | null;
8618
- ignore_nulls: boolean;
8631
+ /**
8632
+ * None = not specified, Some(true) = IGNORE NULLS, Some(false) = RESPECT NULLS
8633
+ */
8634
+ ignore_nulls?: boolean | null;
8619
8635
  };
8620
8636
 
8621
8637
  export declare function least(...exprs: ExprInput[]): Expr;
@@ -11472,6 +11488,11 @@ declare type Select = {
11472
11488
  * TSQL OPTION clause (e.g., OPTION(LABEL = 'foo'))
11473
11489
  */
11474
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;
11475
11496
  };
11476
11497
 
11477
11498
  /** Create a SelectBuilder, optionally pre-populated with columns. */
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyglot-sql/sdk",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "SQL dialect translator powered by WebAssembly",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",