dt-sql-parser 4.5.2-beta.0 → 4.5.2-beta.2

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.
Files changed (31) hide show
  1. package/README.md +8 -8
  2. package/dist/lib/flink/FlinkSqlParser.d.ts +220 -363
  3. package/dist/lib/flink/FlinkSqlParser.js +3246 -4046
  4. package/dist/lib/flink/FlinkSqlParserListener.d.ts +0 -154
  5. package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +0 -98
  6. package/dist/lib/generic/GenericSqlListener.d.ts +90 -5
  7. package/dist/lib/generic/GenericSqlParser.d.ts +102 -33
  8. package/dist/lib/generic/GenericSqlParser.js +1329 -930
  9. package/dist/lib/generic/GenericSqlVisitor.d.ts +56 -3
  10. package/dist/lib/hive/HiveSqlParser.d.ts +515 -943
  11. package/dist/lib/hive/HiveSqlParser.js +8234 -10573
  12. package/dist/lib/hive/HiveSqlParserListener.d.ts +50 -490
  13. package/dist/lib/hive/HiveSqlParserVisitor.d.ts +30 -310
  14. package/dist/lib/impala/ImpalaSqlParser.d.ts +96 -131
  15. package/dist/lib/impala/ImpalaSqlParser.js +3311 -3522
  16. package/dist/lib/impala/ImpalaSqlParserListener.d.ts +0 -44
  17. package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +0 -28
  18. package/dist/lib/mysql/MySqlParser.d.ts +422 -464
  19. package/dist/lib/mysql/MySqlParser.js +9954 -10184
  20. package/dist/lib/mysql/MySqlParserListener.d.ts +0 -44
  21. package/dist/lib/mysql/MySqlParserVisitor.d.ts +0 -28
  22. package/dist/lib/trino/TrinoSqlListener.d.ts +0 -328
  23. package/dist/lib/trino/TrinoSqlParser.d.ts +203 -476
  24. package/dist/lib/trino/TrinoSqlParser.js +6680 -7917
  25. package/dist/lib/trino/TrinoSqlVisitor.d.ts +0 -206
  26. package/dist/parser/common/entityCollector.js +5 -0
  27. package/dist/parser/flink/flinkEntityCollector.js +1 -1
  28. package/dist/parser/generic/genericEntityCollector.d.ts +6 -3
  29. package/dist/parser/generic/genericEntityCollector.js +30 -42
  30. package/dist/parser/generic/index.js +13 -10
  31. package/package.json +1 -1
package/README.md CHANGED
@@ -225,7 +225,7 @@ console.log(sqlSlices)
225
225
  startLine: 1,
226
226
  endLine: 1,
227
227
  startColumn: 1,
228
- endColumn: 12,
228
+ endColumn: 13,
229
229
  text: 'SHOW TABLES;'
230
230
  },
231
231
  {
@@ -234,7 +234,7 @@ console.log(sqlSlices)
234
234
  startLine: 2,
235
235
  endLine: 2,
236
236
  startColumn: 1,
237
- endColumn: 17,
237
+ endColumn: 18,
238
238
  text: 'SELECT * FROM tb;'
239
239
  }
240
240
  ]
@@ -244,7 +244,7 @@ console.log(sqlSlices)
244
244
  ### Code Completion
245
245
  Obtaining code completion information at a specified position in SQL.
246
246
 
247
- Call the `getAllEntities` method on the SQL instance, pass the SQL content and the row and column numbers indicating the position where code completion is desired. The following are some additional explanations about [CaretPosition](#caretposition-of-code-completion).
247
+ Call the `getSuggestionAtCaretPosition` method on the SQL instance, pass the SQL content and the row and column numbers indicating the position where code completion is desired. The following are some additional explanations about [CaretPosition](#caretposition-of-code-completion).
248
248
  + **keyword candidates list**
249
249
 
250
250
  ```javascript
@@ -252,7 +252,7 @@ Call the `getAllEntities` method on the SQL instance, pass the SQL content and t
252
252
 
253
253
  const flink = new FlinkSQL();
254
254
  const sql = 'CREATE ';
255
- const pos = { lineNumber: 1, column: 16 }; // the end position
255
+ const pos = { lineNumber: 1, column: sql.length + 1 }; // the end position
256
256
  const keywords = flink.getSuggestionAtCaretPosition(sql, pos)?.keywords;
257
257
 
258
258
  console.log(keywords);
@@ -296,10 +296,10 @@ Call the `getAllEntities` method on the SQL instance, pass the SQL content and t
296
296
  {
297
297
  text: 'tb',
298
298
  startIndex: 14,
299
- stopIndex: 15,
299
+ endIndex: 15,
300
300
  line: 1,
301
301
  startColumn: 15,
302
- stopColumn: 16
302
+ endColumn: 17
303
303
  }
304
304
  ]
305
305
  },
@@ -309,10 +309,10 @@ Call the `getAllEntities` method on the SQL instance, pass the SQL content and t
309
309
  {
310
310
  text: 'tb',
311
311
  startIndex: 14,
312
- stopIndex: 15,
312
+ endIndex: 15,
313
313
  line: 1,
314
314
  startColumn: 15,
315
- stopColumn: 16
315
+ endColumn: 17
316
316
  }
317
317
  ]
318
318
  }