cql: remove unused functions
It seems that the following functions are never used, delete them: * `function::has_reference_to` * `functions::get_overload_count` * `to_identifiers` in column_identifier.hh * `single_column_relation::get_map_key` Tests: unit(dev, debug) Signed-off-by: Pavel Solodovnikov <pa.solodovnikov@scylladb.com> Message-Id: <20200606115149.1770453-1-pa.solodovnikov@scylladb.com>
This commit is contained in:
committed by
Avi Kivity
parent
3458bd2e32
commit
6f6e6762ba
@@ -139,16 +139,6 @@ static inline
|
||||
return def.column_specification->name;
|
||||
}
|
||||
|
||||
static inline
|
||||
std::vector<::shared_ptr<column_identifier>> to_identifiers(const std::vector<const column_definition*>& defs) {
|
||||
std::vector<::shared_ptr<column_identifier>> r;
|
||||
r.reserve(defs.size());
|
||||
for (auto&& def : defs) {
|
||||
r.push_back(to_identifier(*def));
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace std {
|
||||
|
||||
@@ -95,10 +95,6 @@ public:
|
||||
return _name.keyspace == ks_name && _name.name == function_name;
|
||||
}
|
||||
|
||||
virtual bool has_reference_to(function& f) const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual sstring column_name(const std::vector<sstring>& column_names) const override {
|
||||
return format("{}({})", _name, join(", ", column_names));
|
||||
}
|
||||
|
||||
@@ -144,10 +144,6 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool has_reference_to(function& f) const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual sstring column_name(const std::vector<sstring>& column_names) const override {
|
||||
return "[json]";
|
||||
}
|
||||
|
||||
@@ -82,7 +82,6 @@ public:
|
||||
|
||||
virtual void print(std::ostream& os) const = 0;
|
||||
virtual bool uses_function(const sstring& ks_name, const sstring& function_name) const = 0;
|
||||
virtual bool has_reference_to(function& f) const = 0;
|
||||
|
||||
/**
|
||||
* Returns the name of the function to use within a ResultSet.
|
||||
|
||||
@@ -158,11 +158,6 @@ functions::make_arg_spec(const sstring& receiver_ks, const sstring& receiver_cf,
|
||||
fun.arg_types()[i]);
|
||||
}
|
||||
|
||||
int
|
||||
functions::get_overload_count(const function_name& name) {
|
||||
return _declared.count(name);
|
||||
}
|
||||
|
||||
inline
|
||||
shared_ptr<function>
|
||||
make_to_json_function(data_type t) {
|
||||
|
||||
@@ -69,7 +69,6 @@ private:
|
||||
public:
|
||||
static lw_shared_ptr<column_specification> make_arg_spec(const sstring& receiver_ks, const sstring& receiver_cf,
|
||||
const function& fun, size_t i);
|
||||
static int get_overload_count(const function_name& name);
|
||||
public:
|
||||
static shared_ptr<function> get(database& db,
|
||||
const sstring& keyspace,
|
||||
|
||||
@@ -108,10 +108,6 @@ public:
|
||||
return _entity;
|
||||
}
|
||||
|
||||
::shared_ptr<term::raw> get_map_key() {
|
||||
return _map_key;
|
||||
}
|
||||
|
||||
::shared_ptr<term::raw> get_value() {
|
||||
return _value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user