@polyglot-sql/sdk 0.2.3 → 0.3.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/index.d.cts CHANGED
@@ -2614,6 +2614,17 @@ declare type CreateTable = {
2614
2614
  * ClickHouse: UUID 'xxx' clause after table name
2615
2615
  */
2616
2616
  uuid?: string | null;
2617
+ /**
2618
+ * WITH PARTITION COLUMNS (col_name col_type, ...) — currently used by BigQuery
2619
+ * for hive-partitioned external tables. Not dialect-prefixed since the syntax
2620
+ * could appear in other engines.
2621
+ */
2622
+ with_partition_columns?: Array<ColumnDef>;
2623
+ /**
2624
+ * WITH CONNECTION `project.region.connection` — currently used by BigQuery
2625
+ * for external tables that reference a Cloud Resource connection.
2626
+ */
2627
+ with_connection?: TableRef | null;
2617
2628
  };
2618
2629
 
2619
2630
  /**
@@ -4952,6 +4963,8 @@ declare type Expression = {
4952
4963
  "create_table": CreateTable;
4953
4964
  } | {
4954
4965
  "drop_table": DropTable;
4966
+ } | {
4967
+ "undrop": Undrop;
4955
4968
  } | {
4956
4969
  "alter_table": AlterTable;
4957
4970
  } | {
@@ -6463,6 +6476,8 @@ declare type FunctionBody = {
6463
6476
  content: string;
6464
6477
  tag: string | null;
6465
6478
  };
6479
+ } | {
6480
+ "RawBlock": string;
6466
6481
  };
6467
6482
 
6468
6483
  /**
@@ -6981,6 +6996,10 @@ declare type GroupConcatFunc = {
6981
6996
  order_by: Array<Ordered> | null;
6982
6997
  distinct: boolean;
6983
6998
  filter: Expression | null;
6999
+ /**
7000
+ * MySQL 8.0.19+: LIMIT n inside GROUP_CONCAT
7001
+ */
7002
+ limit?: Expression | null;
6984
7003
  /**
6985
7004
  * Inferred data type from type annotation
6986
7005
  */
@@ -11606,6 +11625,10 @@ declare type Select = {
11606
11625
  * T-SQL FOR XML clause options (PATH, RAW, AUTO, EXPLICIT, BINARY BASE64, ELEMENTS XSINIL, etc.)
11607
11626
  */
11608
11627
  for_xml?: Array<Expression>;
11628
+ /**
11629
+ * T-SQL FOR JSON clause options (PATH, AUTO, ROOT, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER)
11630
+ */
11631
+ for_json?: Array<Expression>;
11609
11632
  /**
11610
11633
  * Leading comments before the statement
11611
11634
  */
@@ -12656,6 +12679,12 @@ declare type TableConstraint = {
12656
12679
  name: Identifier | null;
12657
12680
  expression: Expression;
12658
12681
  };
12682
+ } | {
12683
+ "Default": {
12684
+ name: Identifier | null;
12685
+ expression: Expression;
12686
+ column: Identifier;
12687
+ };
12659
12688
  } | {
12660
12689
  "Index": {
12661
12690
  name: Identifier | null;
@@ -13683,6 +13712,24 @@ declare type Uncache = {
13683
13712
  if_exists: boolean;
13684
13713
  };
13685
13714
 
13715
+ /**
13716
+ * UNDROP TABLE/SCHEMA/DATABASE statement (Snowflake, ClickHouse)
13717
+ */
13718
+ declare type Undrop = {
13719
+ /**
13720
+ * The object kind: "TABLE", "SCHEMA", or "DATABASE"
13721
+ */
13722
+ kind: string;
13723
+ /**
13724
+ * The object name
13725
+ */
13726
+ name: TableRef;
13727
+ /**
13728
+ * IF EXISTS clause
13729
+ */
13730
+ if_exists: boolean;
13731
+ };
13732
+
13686
13733
  /**
13687
13734
  * Unhex
13688
13735
  */
package/dist/index.d.ts CHANGED
@@ -2614,6 +2614,17 @@ declare type CreateTable = {
2614
2614
  * ClickHouse: UUID 'xxx' clause after table name
2615
2615
  */
2616
2616
  uuid?: string | null;
2617
+ /**
2618
+ * WITH PARTITION COLUMNS (col_name col_type, ...) — currently used by BigQuery
2619
+ * for hive-partitioned external tables. Not dialect-prefixed since the syntax
2620
+ * could appear in other engines.
2621
+ */
2622
+ with_partition_columns?: Array<ColumnDef>;
2623
+ /**
2624
+ * WITH CONNECTION `project.region.connection` — currently used by BigQuery
2625
+ * for external tables that reference a Cloud Resource connection.
2626
+ */
2627
+ with_connection?: TableRef | null;
2617
2628
  };
2618
2629
 
2619
2630
  /**
@@ -4952,6 +4963,8 @@ declare type Expression = {
4952
4963
  "create_table": CreateTable;
4953
4964
  } | {
4954
4965
  "drop_table": DropTable;
4966
+ } | {
4967
+ "undrop": Undrop;
4955
4968
  } | {
4956
4969
  "alter_table": AlterTable;
4957
4970
  } | {
@@ -6463,6 +6476,8 @@ declare type FunctionBody = {
6463
6476
  content: string;
6464
6477
  tag: string | null;
6465
6478
  };
6479
+ } | {
6480
+ "RawBlock": string;
6466
6481
  };
6467
6482
 
6468
6483
  /**
@@ -6981,6 +6996,10 @@ declare type GroupConcatFunc = {
6981
6996
  order_by: Array<Ordered> | null;
6982
6997
  distinct: boolean;
6983
6998
  filter: Expression | null;
6999
+ /**
7000
+ * MySQL 8.0.19+: LIMIT n inside GROUP_CONCAT
7001
+ */
7002
+ limit?: Expression | null;
6984
7003
  /**
6985
7004
  * Inferred data type from type annotation
6986
7005
  */
@@ -11606,6 +11625,10 @@ declare type Select = {
11606
11625
  * T-SQL FOR XML clause options (PATH, RAW, AUTO, EXPLICIT, BINARY BASE64, ELEMENTS XSINIL, etc.)
11607
11626
  */
11608
11627
  for_xml?: Array<Expression>;
11628
+ /**
11629
+ * T-SQL FOR JSON clause options (PATH, AUTO, ROOT, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER)
11630
+ */
11631
+ for_json?: Array<Expression>;
11609
11632
  /**
11610
11633
  * Leading comments before the statement
11611
11634
  */
@@ -12656,6 +12679,12 @@ declare type TableConstraint = {
12656
12679
  name: Identifier | null;
12657
12680
  expression: Expression;
12658
12681
  };
12682
+ } | {
12683
+ "Default": {
12684
+ name: Identifier | null;
12685
+ expression: Expression;
12686
+ column: Identifier;
12687
+ };
12659
12688
  } | {
12660
12689
  "Index": {
12661
12690
  name: Identifier | null;
@@ -13683,6 +13712,24 @@ declare type Uncache = {
13683
13712
  if_exists: boolean;
13684
13713
  };
13685
13714
 
13715
+ /**
13716
+ * UNDROP TABLE/SCHEMA/DATABASE statement (Snowflake, ClickHouse)
13717
+ */
13718
+ declare type Undrop = {
13719
+ /**
13720
+ * The object kind: "TABLE", "SCHEMA", or "DATABASE"
13721
+ */
13722
+ kind: string;
13723
+ /**
13724
+ * The object name
13725
+ */
13726
+ name: TableRef;
13727
+ /**
13728
+ * IF EXISTS clause
13729
+ */
13730
+ if_exists: boolean;
13731
+ };
13732
+
13686
13733
  /**
13687
13734
  * Unhex
13688
13735
  */
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyglot-sql/sdk",
3
- "version": "0.2.3",
3
+ "version": "0.3.1",
4
4
  "description": "SQL dialect translator powered by WebAssembly",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",