The QSI is the pure C# Query Structure Interface.
Language | Parser | Repos |
---|---|---|
MySql | MySQL Workbench source code(Antlr4) | mysql-workbench |
PostgreSql10 | PostgreSQL server source code(yacc) | libpg_query, ChakraCore |
JSql | JavaCC | JSqlParser, IKVM |
Oracle | Qsi.JSql | |
SqlServer | Microsoft.SqlServer.TransactSql.ScriptDom | MSDN, NuGet |
PhoenixSql | Phoenix server source code(Antlr3) | PhoenixSql |
PrimarSql | PrimarSql | PrimarSql |
It compiles the result structure and relation
based on semantic tree transformed by parser's for each language.
Features | MySql | PostgreSql | JSql | Oracle | SqlServer | PhoenixSql | PrimarSql |
---|---|---|---|---|---|---|---|
No table | ✔ | ✔ | ✔ | ❌ | ✔ | ✔ | ❌ |
Table access | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Derived table | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ |
Derived table (Non-Alias) | ❌ | ❌ | ✔ | ✔ | ❌ | ✔ | ❌ |
Specify columns to table alias | ❌ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ |
Inline derived table | ❌ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
Table function | ⚠ | ⚠ | ⚠ | ⚠ | ⚠ | ❌ | ❌ |
Table variable | ⚠ | ⚠ | ⚠ | ⚠ | ⚠ | ❌ | ❌ |
Common table expression | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
Common table expression (Aliases) | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
Common table expression (Recursive) | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
Join tables | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ |
Join tables (Pivot columns) | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ |
Join tables (Natural) | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ |
Union many tables | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ |
Table pivot | ⚠ | ⚠ | ⚠ | ⚠ | ⚠ | ❌ | ❌ |
Table unpivot | ⚠ | ⚠ | ⚠ | ⚠ | ⚠ | ❌ | ❌ |
Trace view definition | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ |
Trace variable definition | ⚠ | ⚠ | ⚠ | ⚠ | ⚠ | ❌ | ❌ |
Execute prepared table query | ⚠ | ⚠ | ⚠ | ⚠ | ⚠ | ❌ | ❌ |
Call table procedure | ⚠ | ⚠ | ⚠ | ⚠ | ⚠ | ⚠ | ❌ |
Done? | Feature | Example | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
☑ | No table |
SELECT 1 AS a, '2' AS b |
|
||||||||||
☑ | Table access |
-- table : id, name
SELECT * FROM table |
|
||||||||||
☑ | Derived table |
-- table : id, name
SELECT * FROM
(SELECT * FROM table) AS alias |
|
||||||||||
☑ | Derived table (Non-Alias) |
-- table : id, name
SELECT * FROM
(SELECT * FROM table) |
|
||||||||||
☑ | Specify columns to table alias |
-- table : id, name
SELECT * FROM table AS alias(a, b) |
|
||||||||||
☑ | Inline derived table |
SELECT * FROM
(
VALUES (1, 2), (3, 4)
) AS inline_table(a, b) |
|
||||||||||
☐ | Table function |
-- TODO |
|||||||||||
☐ | Table variable |
-- TODO |
|||||||||||
☑ | Common table expression |
WITH cte AS (SELECT 1 AS n)
SELECT * FROM cte |
|
||||||||||
☑ | Common table expression (Aliases) |
WITH cte (n) AS (SELECT 1)
SELECT * FROM cte |
|
||||||||||
☑ | Common table expression (Recursive) |
WITH RECURSIVE cte AS (
SELECT 1 AS n
UNION ALL
SELECT n + 1 FROM cte WHERE n < 10
)
SELECT * FROM cte |
|
||||||||||
☑ | Join tables |
-- left_table : name, uid
-- right_table : age, uid
SELECT * FROM
left_table l
JOIN right_table r ON l.uid = r.uid |
|
||||||||||
☑ | Join tables (Pivot columns) |
-- left_table : name, uid
-- right_table : age, uid
SELECT * FROM
left_table
JOIN right_table USING (uid) |
|
||||||||||
☑ | Union many tables |
SELECT a FROM first_table
UNION ALL
SELECT b FROM second_table |
|
||||||||||
☐ | Table pivot |
-- TODO |
|||||||||||
☐ | Table unpivot |
-- TODO |
|||||||||||
☑ | Trace view definition |
-- table_view : a, b
-- table : id, name
SELECT * FROM table_view |
|
||||||||||
☐ | Trace variable definition |
-- TODO |
|||||||||||
☐ | Execute prepared table query |
-- TODO |
|||||||||||
☐ | Call table procedure |
-- TODO |
- PowerShell
- .NET Core 3.1
- Java >= 1.8
PS> cd ./qsi
PS> ./Setup.ps1
PS> cd ./qsi
PS> ./Publish.ps1 <VERSION> [-Mode <PUBLISH_MODE>]
-
<VERSION>
Specifies the package version.
Version must be greater than the latest version tag on git.
-
-Mode <PUBLISH_MODE>
Specifies the publish mode.
PUBLISH_MODE Action Publish(Default) Publish packages to NuGet, GitHub repositories Local Publish packages to local repository Archive Build packages to ./qsi/Publish
It supports abstract syntax trees and semantic trees, and a debugger that can debug compilation results.
$ cd qsi/Qsi.Debugger
$ dotnet run