Closed rashtao closed 9 years ago
With this command:
cassanKnex("ks").createColumnFamily("cf") .text("textType") .uuid("uuidType") .timestamp("timestamp") .primary(["textType", "uuidType"], "timestamp");
I get the following CQL query generated:
CREATE COLUMNFAMILY ks.cf ( textType TEXT, uuidType UUID, timestamp TIMESTAMP, PRIMARY KEY ((textType, uuidType), timestamp) ) ;
But this will be stored in Cassandra with all the names lowercase:
> DESCRIBE TABLE cf ; CREATE TABLE ks.cf ( texttype text, uuidtype uuid, "timestamp" timestamp, PRIMARY KEY ((texttype, uuidtype), "timestamp") ) ...
This happens because:
Keyspace, column, and table names created using CQL 3 are case-insensitive unless enclosed in double quotation marks ... http://docs.datastax.com/en/cql/3.0/cql/cql_reference/ucase-lcase_r.html
It would be nice to have in the generated CQL queries all the Keyspaces, columns, and tables names always enclosed in double quotation marks, allowing to specify uppercase letters.
@rashtao can you pull the develop branch and see that your use cases are covered by the enhancements?
@UnbounDev it seems ok!
With this command:
I get the following CQL query generated:
But this will be stored in Cassandra with all the names lowercase:
This happens because:
It would be nice to have in the generated CQL queries all the Keyspaces, columns, and tables names always enclosed in double quotation marks, allowing to specify uppercase letters.