From f81287b385eac1806019f99cb2aa25cde07ccb10 Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Mon, 8 Jun 2015 23:20:24 +0200 Subject: [PATCH] fix: switching to uppercase keyspace Apparently CQL prefers having the name of the keyspace in case it contains any uppercase or funny characters such as: "Wiley_Booth", which makes CQL believes we are asking for "wiley_booth" if quotes are not included. --- src/cassandra.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cassandra.lua b/src/cassandra.lua index 9cadf9f..679595b 100644 --- a/src/cassandra.lua +++ b/src/cassandra.lua @@ -259,7 +259,7 @@ function _M:execute(query, args, options) end function _M:set_keyspace(keyspace_name) - return self:execute("USE " .. keyspace_name) + return self:execute(string.format("USE \"%s\"", keyspace_name)) end function _M:get_trace(result)