-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SQL] use inheritance to support different dialects (#3046)
Rewrite SQL syntax using inheritance to support MySQL, PostgreSQL, T-SQL and Cassandra. Note: Postegre is still in a somewhat WIP state using most features of MySQL. Co-authored-by: Johannes Rappen <[email protected]> Co-authored-by: deathaxe <[email protected]> Co-authored-by: DeathAxe <[email protected]> Co-authored-by: Aziz Köksal <[email protected]> Co-authored-by: Keith Hall <[email protected]>
- Loading branch information
1 parent
426f883
commit 15ccade
Showing
33 changed files
with
13,795 additions
and
756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
%YAML 1.2 | ||
--- | ||
name: Go (Embedded T-SQL) | ||
scope: source.go.embedded-backtick-string.tsql | ||
version: 2 | ||
hidden: true | ||
|
||
extends: Packages/Go/Embeddings/Go (Embedded Backtick String).sublime-syntax | ||
|
||
contexts: | ||
match-raw-string: | ||
# replaces Go.sublime-syntax#match-raw-string | ||
- match: '`' | ||
scope: meta.string.go string.quoted.backtick.go punctuation.definition.string.begin.go | ||
embed: scope:source.tsql.go-embedded-backtick-string | ||
embed_scope: meta.string.go meta.embedded.go source.sql.embedded.go | ||
escape: '`' | ||
escape_captures: | ||
0: meta.string.go string.quoted.backtick.go punctuation.definition.string.end.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Go/Embeddings/TSQL (for Go Embedded Backtick Strings).sublime-syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
%YAML 1.2 | ||
--- | ||
name: T-SQL inside Go backtick string | ||
scope: source.tsql.go-embedded-backtick-string | ||
version: 2 | ||
hidden: true | ||
|
||
extends: Packages/SQL/TSQL.sublime-syntax | ||
|
||
contexts: | ||
prototype: | ||
- meta_prepend: true | ||
- include: scope:source.go#match-raw-text-content | ||
|
||
string-escape: | ||
- meta_prepend: true | ||
- include: scope:source.go#match-raw-string-content | ||
|
||
string-interpolation: | ||
- meta_prepend: true | ||
- include: scope:source.go#match-raw-string-content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.