@polyglot-sql/sdk 0.1.11 → 0.1.13

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.ts CHANGED
@@ -49,6 +49,10 @@ declare type AggFunc = {
49
49
  * LIMIT inside aggregate (e.g., ARRAY_AGG(x ORDER BY y LIMIT 2))
50
50
  */
51
51
  limit?: Expression | null;
52
+ /**
53
+ * Inferred data type from type annotation
54
+ */
55
+ inferred_type?: DataType | null;
52
56
  };
53
57
 
54
58
  /**
@@ -93,6 +97,10 @@ declare type AggregateFunction = {
93
97
  * IGNORE NULLS / RESPECT NULLS
94
98
  */
95
99
  ignore_nulls?: boolean | null;
100
+ /**
101
+ * Inferred data type from type annotation
102
+ */
103
+ inferred_type?: DataType | null;
96
104
  };
97
105
 
98
106
  /**
@@ -146,6 +154,10 @@ declare type Alias = {
146
154
  * Trailing comments that appeared after the alias
147
155
  */
148
156
  trailing_comments: Array<string>;
157
+ /**
158
+ * Inferred data type from type annotation
159
+ */
160
+ inferred_type?: DataType | null;
149
161
  };
150
162
 
151
163
  /** Create an expr AS name alias expression. */
@@ -614,6 +626,51 @@ declare type Annotated = {
614
626
  trailing_comments: Array<string>;
615
627
  };
616
628
 
629
+ /**
630
+ * Parse SQL and annotate the AST with inferred type information.
631
+ *
632
+ * Parses the given SQL and runs bottom-up type inference, populating the
633
+ * `inferred_type` field on value-producing AST nodes (columns, operators,
634
+ * functions, casts, etc.). Use `ast.getInferredType(expr)` to read the
635
+ * inferred type from any expression node.
636
+ *
637
+ * @param sql - The SQL string to parse and annotate
638
+ * @param dialect - The dialect to use for parsing (default: Generic)
639
+ * @param schema - Optional schema for column type resolution
640
+ *
641
+ * @example
642
+ * ```typescript
643
+ * import { annotateTypes, ast, Dialect } from '@polyglot-sql/sdk';
644
+ *
645
+ * const result = annotateTypes(
646
+ * "SELECT a + b FROM t",
647
+ * Dialect.PostgreSQL,
648
+ * { tables: { t: { a: "INT", b: "DOUBLE" } } }
649
+ * );
650
+ *
651
+ * if (result.success) {
652
+ * // Walk the AST and inspect inferred types
653
+ * ast.walk(result.ast![0], (node) => {
654
+ * const dt = ast.getInferredType(node);
655
+ * if (dt) {
656
+ * console.log(ast.getExprType(node), "=>", dt);
657
+ * }
658
+ * });
659
+ * }
660
+ * ```
661
+ */
662
+ export declare function annotateTypes(sql: string, dialect?: Dialect, schema?: Schema): AnnotateTypesResult;
663
+
664
+ /**
665
+ * Result of an annotateTypes operation
666
+ */
667
+ export declare interface AnnotateTypesResult {
668
+ success: boolean;
669
+ /** The AST with `inferred_type` fields populated on value-producing nodes */
670
+ ast?: Expression[];
671
+ error?: string;
672
+ }
673
+
617
674
  /**
618
675
  * Anonymous
619
676
  */
@@ -834,6 +891,7 @@ export declare namespace ast {
834
891
  ExpressionType,
835
892
  getExprData,
836
893
  getExprType,
894
+ getInferredType,
837
895
  isExpressionValue,
838
896
  makeExpr,
839
897
  Alias,
@@ -1139,6 +1197,10 @@ declare type BinaryFunc = {
1139
1197
  * Original function name for round-trip preservation (e.g., NVL vs IFNULL)
1140
1198
  */
1141
1199
  original_name?: string | null;
1200
+ /**
1201
+ * Inferred data type from type annotation
1202
+ */
1203
+ inferred_type?: DataType | null;
1142
1204
  };
1143
1205
 
1144
1206
  /**
@@ -1165,6 +1227,10 @@ declare type BinaryOp = {
1165
1227
  * Comments after the right operand
1166
1228
  */
1167
1229
  trailing_comments: Array<string>;
1230
+ /**
1231
+ * Inferred data type from type annotation
1232
+ */
1233
+ inferred_type?: DataType | null;
1168
1234
  };
1169
1235
 
1170
1236
  /**
@@ -1270,6 +1336,10 @@ declare type Case = {
1270
1336
  * Comments from the CASE keyword (emitted after END)
1271
1337
  */
1272
1338
  comments?: Array<string>;
1339
+ /**
1340
+ * Inferred data type from type annotation
1341
+ */
1342
+ inferred_type?: DataType | null;
1273
1343
  };
1274
1344
 
1275
1345
  /**
@@ -1339,6 +1409,10 @@ declare type Cast = {
1339
1409
  * DEFAULT value ON CONVERSION ERROR (Oracle): CAST(x AS type DEFAULT val ON CONVERSION ERROR)
1340
1410
  */
1341
1411
  default?: Expression | null;
1412
+ /**
1413
+ * Inferred data type from type annotation
1414
+ */
1415
+ inferred_type?: DataType | null;
1342
1416
  };
1343
1417
 
1344
1418
  /** Create a CAST(expr AS type) expression. */
@@ -1535,6 +1609,10 @@ declare type Column = {
1535
1609
  * Source position span
1536
1610
  */
1537
1611
  span?: Span | null;
1612
+ /**
1613
+ * Inferred data type from type annotation
1614
+ */
1615
+ inferred_type?: DataType | null;
1538
1616
  };
1539
1617
 
1540
1618
  /**
@@ -2132,6 +2210,10 @@ declare type CountFunc = {
2132
2210
  * Original function name for case preservation (e.g., "count" or "COUNT")
2133
2211
  */
2134
2212
  original_name?: string | null;
2213
+ /**
2214
+ * Inferred data type from type annotation
2215
+ */
2216
+ inferred_type?: DataType | null;
2135
2217
  };
2136
2218
 
2137
2219
  /**
@@ -3145,6 +3227,7 @@ declare const _default: {
3145
3227
  tokenize: typeof tokenize;
3146
3228
  generate: typeof generate;
3147
3229
  format: typeof format;
3230
+ annotateTypes: typeof annotateTypes;
3148
3231
  getDialects: typeof getDialects;
3149
3232
  getVersion: typeof getVersion;
3150
3233
  lineage: typeof lineage;
@@ -3334,12 +3417,6 @@ declare type Detach = {
3334
3417
  exists: boolean;
3335
3418
  };
3336
3419
 
3337
- /**
3338
- * Polyglot SQL Dialect Translator
3339
- *
3340
- * A WebAssembly-powered SQL dialect translator that can convert SQL
3341
- * between different database dialects (PostgreSQL, MySQL, BigQuery, etc.)
3342
- */
3343
3420
  /**
3344
3421
  * Supported SQL dialects
3345
3422
  */
@@ -6223,6 +6300,10 @@ declare type Function_2 = {
6223
6300
  * Source position span
6224
6301
  */
6225
6302
  span?: Span | null;
6303
+ /**
6304
+ * Inferred data type from type annotation
6305
+ */
6306
+ inferred_type?: DataType | null;
6226
6307
  };
6227
6308
 
6228
6309
  /**
@@ -6545,6 +6626,27 @@ declare function getFunctions(node: Expression): Expression[];
6545
6626
  */
6546
6627
  declare function getIdentifiers(node: Expression): Expression[];
6547
6628
 
6629
+ /**
6630
+ * Get the inferred data type from an Expression, if it has been type-annotated.
6631
+ *
6632
+ * After calling `annotateTypes()`, value-producing expressions (columns, operators,
6633
+ * functions, casts, etc.) carry an `inferred_type` field with their resolved SQL type.
6634
+ *
6635
+ * @example
6636
+ * ```typescript
6637
+ * const result = annotateTypes("SELECT 1 + 2", Dialect.Generic);
6638
+ * if (result.success) {
6639
+ * const addExpr = result.ast![0]; // the SELECT
6640
+ * // Navigate to the "1 + 2" expression and check its type:
6641
+ * const dt = getInferredType(someExpr);
6642
+ * // dt => { data_type: "int", length: null, integer_spelling: false }
6643
+ * }
6644
+ * ```
6645
+ *
6646
+ * @returns The inferred DataType, or `undefined` if not annotated or not a value-producing expression.
6647
+ */
6648
+ export declare function getInferredType(expr: Expression): DataType | undefined;
6649
+
6548
6650
  /**
6549
6651
  * Get all literals in the AST (via WASM)
6550
6652
  */
@@ -6723,6 +6825,10 @@ declare type GroupConcatFunc = {
6723
6825
  order_by: Array<Ordered> | null;
6724
6826
  distinct: boolean;
6725
6827
  filter: Expression | null;
6828
+ /**
6829
+ * Inferred data type from type annotation
6830
+ */
6831
+ inferred_type?: DataType | null;
6726
6832
  };
6727
6833
 
6728
6834
  /**
@@ -6902,6 +7008,10 @@ declare type IfFunc = {
6902
7008
  * Original function name (IF, IFF, IIF) for round-trip preservation
6903
7009
  */
6904
7010
  original_name?: string | null;
7011
+ /**
7012
+ * Inferred data type from type annotation
7013
+ */
7014
+ inferred_type?: DataType | null;
6905
7015
  };
6906
7016
 
6907
7017
  export declare function ifNull(expr: ExprInput, fallback: ExprInput): Expr;
@@ -8535,6 +8645,10 @@ declare type LikeOp = {
8535
8645
  * Quantifier: ANY, ALL, or SOME
8536
8646
  */
8537
8647
  quantifier: string | null;
8648
+ /**
8649
+ * Inferred data type from type annotation
8650
+ */
8651
+ inferred_type?: DataType | null;
8538
8652
  };
8539
8653
 
8540
8654
  /**
@@ -8614,11 +8728,30 @@ export declare interface LineageResult {
8614
8728
  /**
8615
8729
  * Trace the lineage of a column through a SQL query using schema metadata.
8616
8730
  *
8731
+ * When a schema is provided, columns are fully qualified and type-annotated.
8732
+ * Each `LineageNode.expression` will have its `inferred_type` field populated
8733
+ * with the resolved SQL data type. Use `ast.getInferredType(node.expression)`
8734
+ * to read it.
8735
+ *
8617
8736
  * @param column - Column name to trace
8618
8737
  * @param sql - SQL string to analyze
8619
8738
  * @param schema - ValidationSchema-compatible schema object
8620
8739
  * @param dialect - Dialect for parsing/qualification (default: 'generic')
8621
8740
  * @param trimSelects - Trim SELECT to only target column (default: false)
8741
+ *
8742
+ * @example
8743
+ * ```typescript
8744
+ * import { lineageWithSchema, ast } from '@polyglot-sql/sdk';
8745
+ *
8746
+ * const result = lineageWithSchema("name", "SELECT name FROM users", {
8747
+ * tables: { users: { name: "TEXT", id: "INT" } }
8748
+ * });
8749
+ *
8750
+ * if (result.success) {
8751
+ * const dt = ast.getInferredType(result.lineage!.expression);
8752
+ * // dt => { data_type: "text" }
8753
+ * }
8754
+ * ```
8622
8755
  */
8623
8756
  export declare function lineageWithSchema(column: string, sql: string, schema: Schema, dialect?: string, trimSelects?: boolean): LineageResult;
8624
8757
 
@@ -8639,6 +8772,10 @@ declare type ListAggFunc = {
8639
8772
  order_by: Array<Ordered> | null;
8640
8773
  distinct: boolean;
8641
8774
  filter: Expression | null;
8775
+ /**
8776
+ * Inferred data type from type annotation
8777
+ */
8778
+ inferred_type?: DataType | null;
8642
8779
  };
8643
8780
 
8644
8781
  /**
@@ -9365,6 +9502,10 @@ declare type Nvl2Func = {
9365
9502
  this: Expression;
9366
9503
  true_value: Expression;
9367
9504
  false_value: Expression;
9505
+ /**
9506
+ * Inferred data type from type annotation
9507
+ */
9508
+ inferred_type?: DataType | null;
9368
9509
  };
9369
9510
 
9370
9511
  /**
@@ -10138,6 +10279,10 @@ export declare class Polyglot {
10138
10279
  * Get library version.
10139
10280
  */
10140
10281
  getVersion(): string;
10282
+ /**
10283
+ * Parse SQL and annotate the AST with inferred type information.
10284
+ */
10285
+ annotateTypes(sql: string, dialect?: Dialect, schema?: Schema): AnnotateTypesResult;
10141
10286
  }
10142
10287
 
10143
10288
  /**
@@ -12005,6 +12150,10 @@ declare type StringAggFunc = {
12005
12150
  * BigQuery LIMIT inside STRING_AGG
12006
12151
  */
12007
12152
  limit?: Expression | null;
12153
+ /**
12154
+ * Inferred data type from type annotation
12155
+ */
12156
+ inferred_type?: DataType | null;
12008
12157
  };
12009
12158
 
12010
12159
  /**
@@ -12176,6 +12325,10 @@ declare type Subquery = {
12176
12325
  * Trailing comments after the closing paren
12177
12326
  */
12178
12327
  trailing_comments: Array<string>;
12328
+ /**
12329
+ * Inferred data type from type annotation
12330
+ */
12331
+ inferred_type?: DataType | null;
12179
12332
  };
12180
12333
 
12181
12334
  /**
@@ -12231,6 +12384,10 @@ declare type SumIfFunc = {
12231
12384
  this: Expression;
12232
12385
  condition: Expression;
12233
12386
  filter: Expression | null;
12387
+ /**
12388
+ * Inferred data type from type annotation
12389
+ */
12390
+ inferred_type?: DataType | null;
12234
12391
  };
12235
12392
 
12236
12393
  /**
@@ -13312,6 +13469,10 @@ declare type UnaryFunc = {
13312
13469
  * Original function name for round-trip preservation (e.g., CHAR_LENGTH vs LENGTH)
13313
13470
  */
13314
13471
  original_name?: string | null;
13472
+ /**
13473
+ * Inferred data type from type annotation
13474
+ */
13475
+ inferred_type?: DataType | null;
13315
13476
  };
13316
13477
 
13317
13478
  /**
@@ -13324,6 +13485,10 @@ declare type UnaryOp = {
13324
13485
  * The operand expression.
13325
13486
  */
13326
13487
  this: Expression;
13488
+ /**
13489
+ * Inferred data type from type annotation
13490
+ */
13491
+ inferred_type?: DataType | null;
13327
13492
  };
13328
13493
 
13329
13494
  /**
@@ -13848,6 +14013,10 @@ declare type VarArgFunc = {
13848
14013
  * Original function name for round-trip preservation (e.g., COALESCE vs IFNULL)
13849
14014
  */
13850
14015
  original_name?: string | null;
14016
+ /**
14017
+ * Inferred data type from type annotation
14018
+ */
14019
+ inferred_type?: DataType | null;
13851
14020
  };
13852
14021
 
13853
14022
  /**
@@ -14624,6 +14793,10 @@ declare type WindowFunction = {
14624
14793
  * Oracle KEEP clause: KEEP (DENSE_RANK FIRST|LAST ORDER BY ...)
14625
14794
  */
14626
14795
  keep?: Keep | null;
14796
+ /**
14797
+ * Inferred data type from type annotation
14798
+ */
14799
+ inferred_type?: DataType | null;
14627
14800
  };
14628
14801
 
14629
14802
  /**
package/dist/index.js CHANGED
@@ -1587,6 +1587,66 @@ class WasmWindowDefBuilder {
1587
1587
  }
1588
1588
  if (Symbol.dispose) WasmWindowDefBuilder.prototype[Symbol.dispose] = WasmWindowDefBuilder.prototype.free;
1589
1589
 
1590
+ /**
1591
+ * Annotate types on a parsed SQL AST in-place.
1592
+ *
1593
+ * Parses the given SQL, runs type annotation (and optionally uses a schema
1594
+ * for column type resolution), and returns the AST with `inferred_type`
1595
+ * fields populated on value-producing nodes.
1596
+ *
1597
+ * # Arguments
1598
+ * * `sql` - SQL string to parse
1599
+ * * `dialect` - Dialect for parsing
1600
+ * * `schema_json` - Optional JSON schema (same format as `lineage_sql_with_schema`)
1601
+ *
1602
+ * # Returns
1603
+ * JSON string containing `ParseValueResult` with annotated AST
1604
+ * @param {string} sql
1605
+ * @param {string} dialect
1606
+ * @param {string} schema_json
1607
+ * @returns {string}
1608
+ */
1609
+ function annotate_types$1(sql, dialect, schema_json) {
1610
+ let deferred4_0;
1611
+ let deferred4_1;
1612
+ try {
1613
+ const retptr = wasm$3.__wbindgen_add_to_stack_pointer(-16);
1614
+ const ptr0 = passStringToWasm0(sql, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
1615
+ const len0 = WASM_VECTOR_LEN;
1616
+ const ptr1 = passStringToWasm0(dialect, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
1617
+ const len1 = WASM_VECTOR_LEN;
1618
+ const ptr2 = passStringToWasm0(schema_json, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
1619
+ const len2 = WASM_VECTOR_LEN;
1620
+ wasm$3.annotate_types(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
1621
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1622
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1623
+ deferred4_0 = r0;
1624
+ deferred4_1 = r1;
1625
+ return getStringFromWasm0(r0, r1);
1626
+ } finally {
1627
+ wasm$3.__wbindgen_add_to_stack_pointer(16);
1628
+ wasm$3.__wbindgen_export4(deferred4_0, deferred4_1, 1);
1629
+ }
1630
+ }
1631
+
1632
+ /**
1633
+ * Annotate types on a parsed SQL AST, returning a JsValue.
1634
+ * @param {string} sql
1635
+ * @param {string} dialect
1636
+ * @param {string} schema_json
1637
+ * @returns {any}
1638
+ */
1639
+ function annotate_types_value$1(sql, dialect, schema_json) {
1640
+ const ptr0 = passStringToWasm0(sql, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
1641
+ const len0 = WASM_VECTOR_LEN;
1642
+ const ptr1 = passStringToWasm0(dialect, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
1643
+ const len1 = WASM_VECTOR_LEN;
1644
+ const ptr2 = passStringToWasm0(schema_json, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
1645
+ const len2 = WASM_VECTOR_LEN;
1646
+ const ret = wasm$3.annotate_types_value(ptr0, len0, ptr1, len1, ptr2, len2);
1647
+ return takeObject(ret);
1648
+ }
1649
+
1590
1650
  /**
1591
1651
  * Add a WHERE condition to a SELECT AST.
1592
1652
  * @param {string} ast_json
@@ -3423,6 +3483,8 @@ const __wbg_wasmselectbuilder_free = __vite__wasmModule.__wbg_wasmselectbuilder_
3423
3483
  const __wbg_wasmsetopbuilder_free = __vite__wasmModule.__wbg_wasmsetopbuilder_free;
3424
3484
  const __wbg_wasmupdatebuilder_free = __vite__wasmModule.__wbg_wasmupdatebuilder_free;
3425
3485
  const __wbg_wasmwindowdefbuilder_free = __vite__wasmModule.__wbg_wasmwindowdefbuilder_free;
3486
+ const annotate_types = __vite__wasmModule.annotate_types;
3487
+ const annotate_types_value = __vite__wasmModule.annotate_types_value;
3426
3488
  const ast_add_where = __vite__wasmModule.ast_add_where;
3427
3489
  const ast_get_aggregate_functions = __vite__wasmModule.ast_get_aggregate_functions;
3428
3490
  const ast_get_column_names = __vite__wasmModule.ast_get_column_names;
@@ -3610,6 +3672,8 @@ const wasm$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
3610
3672
  __wbindgen_export2,
3611
3673
  __wbindgen_export3,
3612
3674
  __wbindgen_export4,
3675
+ annotate_types,
3676
+ annotate_types_value,
3613
3677
  ast_add_where,
3614
3678
  ast_get_aggregate_functions,
3615
3679
  ast_get_column_names,
@@ -3793,6 +3857,8 @@ const wasmModule = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty
3793
3857
  WasmSetOpBuilder,
3794
3858
  WasmUpdateBuilder,
3795
3859
  WasmWindowDefBuilder,
3860
+ annotate_types: annotate_types$1,
3861
+ annotate_types_value: annotate_types_value$1,
3796
3862
  ast_add_where: ast_add_where$1,
3797
3863
  ast_get_aggregate_functions: ast_get_aggregate_functions$1,
3798
3864
  ast_get_column_names: ast_get_column_names$1,
@@ -3869,6 +3935,16 @@ function isExpressionValue(value) {
3869
3935
  function makeExpr(type, data) {
3870
3936
  return { [type]: data };
3871
3937
  }
3938
+ function getInferredType(expr) {
3939
+ const data = getExprData(expr);
3940
+ if (data && typeof data === "object" && "inferred_type" in data) {
3941
+ const it = data["inferred_type"];
3942
+ if (it != null) {
3943
+ return it;
3944
+ }
3945
+ }
3946
+ return void 0;
3947
+ }
3872
3948
 
3873
3949
  function isType(type) {
3874
3950
  return (expr) => type in expr;
@@ -4451,6 +4527,7 @@ const index$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
4451
4527
  getExprType,
4452
4528
  getFunctions,
4453
4529
  getIdentifiers,
4530
+ getInferredType,
4454
4531
  getLiterals,
4455
4532
  getNodeDepth,
4456
4533
  getParent,
@@ -5634,6 +5711,30 @@ function getDialects() {
5634
5711
  function getVersion() {
5635
5712
  return wasm.version();
5636
5713
  }
5714
+ function annotateTypes(sql, dialect = "generic" /* Generic */, schema) {
5715
+ try {
5716
+ const schemaJson = schema ? JSON.stringify(schema) : "";
5717
+ if (typeof wasm.annotate_types_value === "function") {
5718
+ return decodeWasmPayload(
5719
+ wasm.annotate_types_value(sql, dialect, schemaJson)
5720
+ );
5721
+ }
5722
+ if (typeof wasm.annotate_types === "function") {
5723
+ return JSON.parse(
5724
+ wasm.annotate_types(sql, dialect, schemaJson)
5725
+ );
5726
+ }
5727
+ return {
5728
+ success: false,
5729
+ error: "annotate_types not available in this WASM build"
5730
+ };
5731
+ } catch (error) {
5732
+ return {
5733
+ success: false,
5734
+ error: `WASM annotate_types failed: ${errorMessage(error)}`
5735
+ };
5736
+ }
5737
+ }
5637
5738
  class Polyglot {
5638
5739
  static instance = null;
5639
5740
  constructor() {
@@ -5701,6 +5802,12 @@ class Polyglot {
5701
5802
  getVersion() {
5702
5803
  return getVersion();
5703
5804
  }
5805
+ /**
5806
+ * Parse SQL and annotate the AST with inferred type information.
5807
+ */
5808
+ annotateTypes(sql, dialect = "generic" /* Generic */, schema) {
5809
+ return annotateTypes(sql, dialect, schema);
5810
+ }
5704
5811
  }
5705
5812
  const index = {
5706
5813
  init,
@@ -5710,6 +5817,7 @@ const index = {
5710
5817
  tokenize,
5711
5818
  generate,
5712
5819
  format,
5820
+ annotateTypes,
5713
5821
  getDialects,
5714
5822
  getVersion,
5715
5823
  lineage: lineage,
@@ -5723,4 +5831,4 @@ const index = {
5723
5831
  Polyglot
5724
5832
  };
5725
5833
 
5726
- export { CaseBuilder, DeleteBuilder, Dialect, Expr, InsertBuilder, MergeBuilder, Polyglot, SelectBuilder, SetOpBuilder, UpdateBuilder, ValidationSeverity, WindowDefBuilder, abs, alias, and, index$1 as ast, avg, boolean, caseOf, caseWhen, cast, ceil, changesOnly, coalesce, col, concatWs, condition, count, countDistinct, currentDate, currentTime, currentTimestamp, index as default, del, deleteFrom, denseRank, diff, except, exp, extract, findAll, floor, format, formatWithOptions, func, generate, getColumns, getDialects, getSourceTables, getVersion, greatest, hasChanges, ifNull, init, initcap, insert, insertInto, intersect, isColumn, isFunction, isInitialized, isLiteral, isSelect, least, length, lineage, lineageWithSchema, lit, ln, lower, ltrim, max, mergeInto, min, not, nullIf, or, parse, plan, power, rank, renameColumns, replace, reverse, round, rowNumber, rtrim, select, sign, sqlExpr, sqlNull, sqrt, star, subquery, substring, sum, table, tokenize, transform, transpile, trim, union, unionAll, update, upper, validate, validateWithSchema, walk };
5834
+ export { CaseBuilder, DeleteBuilder, Dialect, Expr, InsertBuilder, MergeBuilder, Polyglot, SelectBuilder, SetOpBuilder, UpdateBuilder, ValidationSeverity, WindowDefBuilder, abs, alias, and, annotateTypes, index$1 as ast, avg, boolean, caseOf, caseWhen, cast, ceil, changesOnly, coalesce, col, concatWs, condition, count, countDistinct, currentDate, currentTime, currentTimestamp, index as default, del, deleteFrom, denseRank, diff, except, exp, extract, findAll, floor, format, formatWithOptions, func, generate, getColumns, getDialects, getInferredType, getSourceTables, getVersion, greatest, hasChanges, ifNull, init, initcap, insert, insertInto, intersect, isColumn, isFunction, isInitialized, isLiteral, isSelect, least, length, lineage, lineageWithSchema, lit, ln, lower, ltrim, max, mergeInto, min, not, nullIf, or, parse, plan, power, rank, renameColumns, replace, reverse, round, rowNumber, rtrim, select, sign, sqlExpr, sqlNull, sqrt, star, subquery, substring, sum, table, tokenize, transform, transpile, trim, union, unionAll, update, upper, validate, validateWithSchema, walk };
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyglot-sql/sdk",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "SQL dialect translator powered by WebAssembly",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",