Skip to content

Commit

Permalink
feat(grammar): Support JSON_TABLE (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebz committed Jun 15, 2024
1 parent 138ff5e commit 1cb8e99
Show file tree
Hide file tree
Showing 8 changed files with 332 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
3,
3
],
"JSON_TABLE-5.sql" : [
2,
2
],
"JSON_TABLE-6.sql" : [
2
],
"ROW_NUMBER-1.sql" : [
10,
10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2156,36 +2156,6 @@
"JSON_TABLE-0.sql" : [
5
],
"JSON_TABLE-10.sql" : [
6
],
"JSON_TABLE-11.sql" : [
6
],
"JSON_TABLE-12.sql" : [
5
],
"JSON_TABLE-2.sql" : [
6
],
"JSON_TABLE-4.sql" : [
6
],
"JSON_TABLE-5.sql" : [
6
],
"JSON_TABLE-6.sql" : [
6
],
"JSON_TABLE-7.sql" : [
4
],
"JSON_TABLE-8.sql" : [
4
],
"JSON_TABLE-9.sql" : [
4
],
"JSON_VALUE-1.sql" : [
2
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,27 @@
"IS-OF-type-Condition-0.sql" : [
2
],
"JSON_TABLE-10.sql" : [
2
],
"JSON_TABLE-11.sql" : [
2
],
"JSON_TABLE-12.sql" : [
2
],
"JSON_TABLE-4.sql" : [
2
],
"JSON_TABLE-7.sql" : [
2
],
"JSON_TABLE-8.sql" : [
2
],
"JSON_TABLE-9.sql" : [
2
],
"Joins-3.sql" : [
2
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@
"JSON-Object-Access-Expressions-2.sql" : [
3
],
"JSON_TABLE-11.sql" : [
3
],
"JSON_TABLE-12.sql" : [
3
],
"MERGE-0.sql" : [
5,
5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ enum class PlSqlKeyword(override val value: String, val isReserved: Boolean = fa
CACHE("cache"),
CASCADE("cascade"),
CASE("case"),
CASE_SENSITIVE("case_sensitive"),
CAST("cast"),
CHARACTER("character"),
CHARSET("charset"),
Expand Down Expand Up @@ -173,6 +174,7 @@ enum class PlSqlKeyword(override val value: String, val isReserved: Boolean = fa
CONTENT("content"),
CONTEXT("context"),
CONTINUE("continue"),
CONVERSION("conversion"),
COUNT("count"),
CRASH("crash"),
CROSS("cross"),
Expand All @@ -183,6 +185,7 @@ enum class PlSqlKeyword(override val value: String, val isReserved: Boolean = fa
CURRVAL("currval"),
CURSOR("cursor"),
CYCLE("cycle"),
DATA("data"),
DATABASE("database"),
DATE("date"),
DAY("day"),
Expand Down Expand Up @@ -227,6 +230,7 @@ enum class PlSqlKeyword(override val value: String, val isReserved: Boolean = fa
EXIT("exit"),
EXTEND("extend"),
EXTERNAL("external"),
EXTRA("extra"),
EXTRACT("extract"),
FALSE("false"),
FINAL("final"),
Expand Down Expand Up @@ -254,6 +258,7 @@ enum class PlSqlKeyword(override val value: String, val isReserved: Boolean = fa
HIERARCHY("hierarchy"),
HOUR("hour"),
IF("if"),
IGNORE("ignore"),
IMMEDIATE("immediate"),
IMMUTABLE("immutable"),
INCREMENT("increment"),
Expand Down Expand Up @@ -281,9 +286,10 @@ enum class PlSqlKeyword(override val value: String, val isReserved: Boolean = fa
JSON_MERGEPATCH("json_mergepatch"),
JSON_OBJECT("json_object"),
JSON_OBJECTAGG("json_objectagg"),
JSON_QUERY("json_query"),
JSON_SCALAR("json_scalar"),
JSON_SERIALIZE("json_serialize"),
JSON_QUERY("json_query"),
JSON_TABLE("json_table"),
KEEP("keep"),
KEY("key"),
KEYS("keys"),
Expand Down Expand Up @@ -323,6 +329,7 @@ enum class PlSqlKeyword(override val value: String, val isReserved: Boolean = fa
MINUTE("minute"),
MINVALUE("minvalue"),
MISMATCH("mismatch"),
MISSING("missing"),
MODE("mode"),
MODEL("model"),
MOD_KEYWORD("mod"),
Expand Down Expand Up @@ -441,6 +448,7 @@ enum class PlSqlKeyword(override val value: String, val isReserved: Boolean = fa
SCALARS("scalars"),
SCHEMA("schema"),
SCHEMACHECK("schemacheck"),
SDO_GEOMETRY("sdo_geometry"),
SEARCH("search"),
SECOND("second"),
SEGMENT("segment"),
Expand Down Expand Up @@ -513,6 +521,7 @@ enum class PlSqlKeyword(override val value: String, val isReserved: Boolean = fa
VARCHAR2("varchar2"),
VARRAY("varray"),
VARYING("varying"),
VECTOR("vector"),
VERSION("version"),
VIEWS("views"),
WAIT("wait"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ enum class PlSqlPunctuator(override val value: String) : TokenType {
ASSOCIATION("=>"),
EXCLAMATION("!"),
TILDE("~"),
CARET("^");
CARET("^"),
LBRACKET("["),
RBRACKET("]"),;

override fun hasToBeSkippedFromAst(node: AstNode?) = false
}
Loading

0 comments on commit 1cb8e99

Please sign in to comment.