mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 04:06:59 +00:00
transport: Use constant for CQL version
There's a CQL version constant in query processor. Use it when advertising CQL version to clients. Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This commit is contained in:
@@ -38,6 +38,8 @@ using namespace transport::messages;
|
||||
|
||||
thread_local logging::logger log("query_processor");
|
||||
|
||||
const sstring query_processor::CQL_VERSION = "3.2.0";
|
||||
|
||||
future<::shared_ptr<result_message>>
|
||||
query_processor::process(const sstring_view& query_string, service::query_state& query_state, query_options& options)
|
||||
{
|
||||
|
||||
@@ -45,9 +45,9 @@ private:
|
||||
public:
|
||||
query_processor(service::storage_proxy& proxy, distributed<database>& db) : _proxy(proxy), _db(db) {}
|
||||
|
||||
#if 0
|
||||
public static final SemanticVersion CQL_VERSION = new SemanticVersion("3.2.0");
|
||||
static const sstring CQL_VERSION;
|
||||
|
||||
#if 0
|
||||
public static final QueryProcessor instance = new QueryProcessor();
|
||||
#endif
|
||||
private:
|
||||
|
||||
@@ -506,8 +506,7 @@ future<> cql_server::connection::write_ready(int16_t stream)
|
||||
future<> cql_server::connection::write_supported(int16_t stream)
|
||||
{
|
||||
std::multimap<sstring, sstring> opts;
|
||||
opts.insert({"CQL_VERSION", "3.0.0"});
|
||||
opts.insert({"CQL_VERSION", "3.2.0"});
|
||||
opts.insert({"CQL_VERSION", cql3::query_processor::CQL_VERSION});
|
||||
opts.insert({"COMPRESSION", "snappy"});
|
||||
auto response = make_shared<cql_server::response>(stream, cql_binary_opcode::SUPPORTED);
|
||||
response->write_string_multimap(opts);
|
||||
|
||||
Reference in New Issue
Block a user