Skip to content

Commit f887767

Browse files
Lorak-mmkavelanarius
authored andcommitted
Metadata.java: Add missing reserved keywords
Added all the missing reserved CQL keywords. Generated using a simple script: https://github.com/Lorak-mmk/cql_reserved_keywords I didn't remove keywords that were in Metadata.java, but are not in my list, in case they were reserved in older Cassandra/Scylla versions.
1 parent f63017a commit f887767

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

driver-core/src/main/java/com/datastax/driver/core/Metadata.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public class Metadata {
6666
// See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#appendixA
6767
private static final IntObjectHashMap<List<char[]>> RESERVED_KEYWORDS =
6868
indexByCaseInsensitiveHash(
69+
"-infinity",
70+
"-nan",
6971
"add",
7072
"allow",
7173
"alter",
@@ -77,38 +79,54 @@ public class Metadata {
7779
"batch",
7880
"begin",
7981
"by",
82+
"cast",
8083
"columnfamily",
8184
"create",
85+
"default",
8286
"delete",
8387
"desc",
88+
"describe",
8489
"drop",
8590
"each_quorum",
91+
"entries",
92+
"execute",
8693
"from",
94+
"full",
8795
"grant",
96+
"if",
8897
"in",
8998
"index",
9099
"inet",
91100
"infinity",
92101
"insert",
93102
"into",
103+
"is",
94104
"keyspace",
95105
"keyspaces",
96106
"limit",
97107
"local_one",
98108
"local_quorum",
109+
"materialized",
99110
"modify",
100111
"nan",
101112
"norecursive",
113+
"not",
114+
"null",
102115
"of",
103116
"on",
104117
"one",
118+
"or",
105119
"order",
106120
"password",
107121
"primary",
108122
"quorum",
109123
"rename",
124+
"replace",
110125
"revoke",
111126
"schema",
127+
"scylla_clustering_bound",
128+
"scylla_counter_shard_list",
129+
"scylla_timeuuid_list_index",
112130
"select",
113131
"set",
114132
"table",
@@ -118,9 +136,11 @@ public class Metadata {
118136
"truncate",
119137
"two",
120138
"unlogged",
139+
"unset",
121140
"update",
122141
"use",
123142
"using",
143+
"view",
124144
"where",
125145
"with");
126146

0 commit comments

Comments
 (0)