Commit b363c60
committed
feat(parser): replace SelectFinder with SimpleSelectFinder
Refactor SQL command parsing to improve performance and maintainability. The new implementation utilizes a regex for simple SELECT statements and a dedicated visitor class for parsing.
- Added a using directive for `Microsoft.SqlServer.Management.SqlParser.Parser` in `Command.cs`.
- Introduced a private static readonly regex `SimpleSelectRegex` in `Command.cs`.
- Removed the previous implementation of `SimpleSelectRegex`.
- Updated `Command.cs` to use `SimpleSelectFinder` for SQL command parsing.
- Removed the `SelectFinder` class from `SelectFinder.cs`.
- Added `SimpleSelectFinder` class in `SimpleSelectFinder.cs` with visit methods for various SQL code objects.
- Updated `SQLHelper.DB.csproj` to remove the `SQLParser` package reference.1 parent 7ed91e2 commit b363c60
File tree
5 files changed
+1486
-106
lines changed- SQLHelper.SpeedTests/Tests/AltImplementations/HelperClasses
- src/SQLHelper.DB
- HelperClasses
5 files changed
+1486
-106
lines changedLines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
135 | 141 | | |
136 | 142 | | |
137 | 143 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
242 | | - | |
243 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
| |||
Lines changed: 0 additions & 49 deletions
This file was deleted.
0 commit comments