0.0.1-alpha.15

This commit is contained in:
Kijin-Seija
2024-06-19 20:12:27 +08:00
parent 9e0985b903
commit fa4666273d
4 changed files with 113 additions and 16 deletions

View File

@ -12,7 +12,7 @@
<script type="module">
const { DtSqlParserSemAnalysePlugin } = await import(/* @vite-ignore */import.meta.env.VITE_ENTRY_PATH)
const myPlugin = new DtSqlParserSemAnalysePlugin()
const sql = 'INSERT INTO |'
const sql = 'CREATE TABLE "public"."h1" (c1 int8 not null, c2 int8, c3 int8) with (appendonly = true, orientation = horc) TABLESPACE horc_default DISTRIBUTED BY (|)'
const caretColumn = sql.indexOf('|') + 1
const result = myPlugin.parse(sql.replace('|', ''), { lineNumber: 1, columnNumber: caretColumn })
console.log(result)