incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy <li...@persistability.plus.com>
Subject CQL and reserved keywords
Date Tue, 04 Mar 2014 09:52:07 GMT
Hi,

while adding support for Cassandra into DataNucleus I came across the 
following
CREATE TABLE schema1.mapfkvalueitem (desc varchar,key varchar,name 
varchar,mapfkvalueitem_id bigint, PRIMARY KEY (mapfkvalueitem_id));

which fails with the delightfully informative message
Bad Request: line 1:37 no viable alternative at input 'desc'


Simple trial and error leads me to the conclusion that this is due to "desc" 
being a reserved keyword that cannot be used for column identifiers.

1. Is there a list somewhere of reserved keywords that I can access so that I 
prohibit a user entering such a column name? a method on the DataStax Java 
driver would be great, but otherwise a web page somewhere would do. 

2. Wouldn't it be better to have that error message updated to be a bit more 
descriptive such as "'desc' is a reserved keyword, so cannot be used as a 
table/column identifier" or even just "'desc' is a reserved keyword" ?


TIA
-- 
Andy

Mime
View raw message