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
37 lines
874 B
C++
37 lines
874 B
C++
/*
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2015-present ScyllaDB
|
|
*
|
|
* Modified by ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <seastar/core/sstring.hh>
|
|
#include "replica/database_fwd.hh"
|
|
#include "schema_fwd.hh"
|
|
|
|
using namespace seastar;
|
|
|
|
namespace data_dictionary {
|
|
class database;
|
|
}
|
|
|
|
namespace validation {
|
|
|
|
constexpr size_t max_key_size = std::numeric_limits<uint16_t>::max();
|
|
|
|
// Returns an error string if key is invalid, a disengaged optional otherwise.
|
|
std::optional<sstring> is_cql_key_invalid(const schema& schema, partition_key_view key);
|
|
void validate_cql_key(const schema& schema, partition_key_view key);
|
|
schema_ptr validate_column_family(data_dictionary::database db, const sstring& keyspace_name, const sstring& cf_name);
|
|
void validate_keyspace(data_dictionary::database db, const sstring& keyspace_name);
|
|
|
|
}
|