mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
Instead of lengthy blurbs, switch to single-line, machine-readable standardized (https://spdx.dev) license identifiers. The Linux kernel switched long ago, so there is strong precedent. Three cases are handled: AGPL-only, Apache-only, and dual licensed. For the latter case, I chose (AGPL-3.0-or-later and Apache-2.0), reasoning that our changes are extensive enough to apply our license. The changes we applied mechanically with a script, except to licenses/README.md. Closes #9937
39 lines
1.0 KiB
C++
39 lines
1.0 KiB
C++
/*
|
|
* Copyright 2020-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#include <seastar/core/print.hh>
|
|
#include "transport/cql_protocol_extension.hh"
|
|
#include "cql3/result_set.hh"
|
|
|
|
#include <map>
|
|
|
|
namespace cql_transport {
|
|
|
|
static const std::map<cql_protocol_extension, seastar::sstring> EXTENSION_NAMES = {
|
|
{cql_protocol_extension::LWT_ADD_METADATA_MARK, "SCYLLA_LWT_ADD_METADATA_MARK"}
|
|
};
|
|
|
|
cql_protocol_extension_enum_set supported_cql_protocol_extensions() {
|
|
return cql_protocol_extension_enum_set::full();
|
|
}
|
|
|
|
const seastar::sstring& protocol_extension_name(cql_protocol_extension ext) {
|
|
return EXTENSION_NAMES.at(ext);
|
|
}
|
|
|
|
std::vector<seastar::sstring> additional_options_for_proto_ext(cql_protocol_extension ext) {
|
|
switch (ext) {
|
|
case cql_protocol_extension::LWT_ADD_METADATA_MARK:
|
|
return {format("LWT_OPTIMIZATION_META_BIT_MASK={:d}", cql3::prepared_metadata::LWT_FLAG_MASK)};
|
|
default:
|
|
return {};
|
|
}
|
|
}
|
|
|
|
} // namespace cql_transport
|