they are part of the CQL type system, and are "closer" to types.
let's move them into "types" directory.
the building systems are updated accordingly.
the source files referencing `types.hh` were updated using following
command:
```
find . -name "*.{cc,hh}" -exec sed -i 's/\"types.hh\"/\"types\/types.hh\"/' {} +
```
the source files under sstables include "types.hh", which is
indeed the one located under "sstables", so include "sstables/types.hh"
instea, so it's more explicit.
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
Closes #12926
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
/*
|
|
* Copyright (C) 2015-present ScyllaDB
|
|
*
|
|
* Modified by ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "types/types.hh"
|
|
|
|
namespace cql3 {
|
|
|
|
class column_identifier;
|
|
|
|
class column_specification final {
|
|
public:
|
|
const sstring ks_name;
|
|
const sstring cf_name;
|
|
const ::shared_ptr<column_identifier> name;
|
|
const data_type type;
|
|
|
|
column_specification(std::string_view ks_name_, std::string_view cf_name_, ::shared_ptr<column_identifier> name_, data_type type_);
|
|
|
|
/**
|
|
* Returns a new <code>ColumnSpecification</code> for the same column but with the specified alias.
|
|
*
|
|
* @param alias the column alias
|
|
* @return a new <code>ColumnSpecification</code> for the same column but with the specified alias.
|
|
*/
|
|
lw_shared_ptr<column_specification> with_alias(::shared_ptr<column_identifier> alias) {
|
|
return make_lw_shared<column_specification>(ks_name, cf_name, alias, type);
|
|
}
|
|
|
|
bool is_reversed_type() const {
|
|
return ::dynamic_pointer_cast<const reversed_type_impl>(type) != nullptr;
|
|
}
|
|
|
|
static bool all_in_same_table(const std::vector<lw_shared_ptr<column_specification>>& names);
|
|
};
|
|
|
|
}
|