From bca7469cfaf979ba8adeb5f6f1b4d83a6b5f18e1 Mon Sep 17 00:00:00 2001 From: lihanbo Date: Mon, 6 Jan 2025 12:19:00 +0800 Subject: [PATCH] =?UTF-8?q?Add=20DuckDb=E6=9F=A5=E8=AF=A2=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExcelHelper.csproj | 12 ++ HL/SQL.xshd | 289 ++++++++++++++++++++++++++++++ MainWindow.xaml | 79 ++++++-- Utils/PasswordBoxHelper.cs | 7 +- Views/Pages/DataListPage.xaml | 1 + Views/Pages/ImportExcelPage.xaml | 5 - Views/Pages/SqlQueryPage.xaml | 65 +++++++ Views/Pages/SqlQueryPage.xaml.cs | 80 +++++++++ Views/ViewModels/MainViewModel.cs | 1 + 9 files changed, 514 insertions(+), 25 deletions(-) create mode 100644 HL/SQL.xshd create mode 100644 Views/Pages/SqlQueryPage.xaml create mode 100644 Views/Pages/SqlQueryPage.xaml.cs diff --git a/ExcelHelper.csproj b/ExcelHelper.csproj index ce2871e..3175fbc 100644 --- a/ExcelHelper.csproj +++ b/ExcelHelper.csproj @@ -21,7 +21,11 @@ false true true + Size + + + False @@ -35,9 +39,17 @@ + + Always + + + + 8.3.2 + + 3.5.1 diff --git a/HL/SQL.xshd b/HL/SQL.xshd new file mode 100644 index 0000000..b089135 --- /dev/null +++ b/HL/SQL.xshd @@ -0,0 +1,289 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TODO + FIXME + + + HACK + UNDONE + + + + + + ' + ' + + + + " + " + + + + + + /\* + \*/ + + + + ABORT + BETWEEN + CRASH + DIGITS + ACCEPT + BINARY_INTEGER + CREATE + DISPOSE + ACCESS + BODY + CURRENT + DISTINCT + ADD + BOOLEAN + CURRVAL + DO + ALL + BY + CURSOR + DROP + ALTER + CASE + DATABASE + ELSE + AND + CHAR + DATA_BASE + ELSIF + ANY + CHAR_BASE + DATE + END + ARRAY + CHECK + DBA + ENTRY + ARRAYLEN + CLOSE + DEBUGOFF + EXCEPTION + AS + CLUSTER + DEBUGON + EXCEPTION_INIT + ASC + CLUSTERS + DECLARE + EXISTS + ASSERT + COLAUTH + DECIMAL + EXIT + ASSIGN + COLUMNS + DEFAULT + FALSE + AT + COMMIT + DEFINITION + FETCH + AUTHORIZATION + COMPRESS + DELAY + FLOAT + AVG + CONNECT + DELETE + FOR + BASE_TABLE + CONSTANT + DELTA + FORM + BEGIN + COUNT + DESC + FROM + FUNCTION + NEW + RELEASE + SUM + GENERIC + NEXTVAL + REMR + TABAUTH + GOTO + NOCOMPRESS + RENAME + TABLE + GRANT + NOT + RESOURCE + TABLES + GROUP + NULL + RETURN + TASK + HAVING + NUMBER + REVERSE + TERMINATE + IDENTIFIED + NUMBER_BASE + REVOKE + THEN + IF + OF + ROLLBACK + TO + IN + ON + ROWID + TRUE + INDEX + OPEN + ROWLABEL + TYPE + INDEXES + OPTION + ROWNUM + UNION + INDICATOR + OR + ROWTYPE + UNIQUE + INSERT + ORDER + RUN + UPDATE + INTEGER + OTHERS + SAVEPOINT + USE + INTERSECT + OUT + SCHEMA + VALUES + INTO + PACKAGE + SELECT + VARCHAR + IS + PARTITION + SEPARATE + VARCHAR2 + LEVEL + PCTFREE + SET + VARIANCE + LIKE + POSITIVE + SIZE + VIEW + LIMITED + PRAGMA + SMALLINT + VIEWS + LOOP + PRIOR + SPACE + WHEN + MAX + PRIVATE + SQL + WHERE + MIN + PROCEDURE + SQLCODE + WHILE + MINUS + PUBLIC + SQLERRM + WITH + MLSLABEL + RAISE + START + WORK + MOD + RANGE + STATEMENT + XOR + MODE + REAL + STDDEV + NATURAL + RECORD + SUBTYPE + TRUNCATE + INSTALL + LOAD + + + + NOCOUNT + + + + GO + + + ([\d\w]+)\.([\d\w]+)\.([\d\w]+) + ([\d\w]+)\.([\d\w]+) + + ([\d\w]+)\.([\d\w]+)\.([\d\w]+) + \[([\d\w]+)\]\.\[([\d\w]+)\]\.\[([\d\w]+)\] + \[([\d\w]+)\]\.\[([\d\w]+)\] + + + [?,.;()\[\]{}+\-/%*<>^+~!|&]+ + + + [\d\w_]+(?=(\s*\()) + @@([\w]+) + @([\w]+) + + + + \b0[xX][0-9a-fA-F]+ # hex number + | + ( \b\d+(\.[0-9]+)? #number with optional floating point + | \.[0-9]+ #or just starting with floating point + ) + ([eE][+-]?[0-9]+)? # optional exponent + + + + + \ No newline at end of file diff --git a/MainWindow.xaml b/MainWindow.xaml index d1cd8c3..c380185 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -28,31 +28,80 @@ Command="{Binding SideMenuSelectCommand}" CommandParameter="DataListPage" Header="已导入的数据" /> + - - - - + + + + - - - + + + - - - -