Drop the AGPL license in favor of a source-available license. See the blog post [1] for details. [1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
40 lines
894 B
C++
40 lines
894 B
C++
/*
|
|
* Copyright (C) 2015-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
*/
|
|
|
|
#include "selector.hh"
|
|
#include "raw_selector.hh"
|
|
#include "selectable-expr.hh"
|
|
#include "cql3/expr/expr-utils.hh"
|
|
|
|
namespace cql3 {
|
|
|
|
namespace selection {
|
|
|
|
std::vector<prepared_selector>
|
|
raw_selector::to_prepared_selectors(const std::vector<::shared_ptr<raw_selector>>& raws,
|
|
const schema& schema, data_dictionary::database db, const sstring& ks) {
|
|
std::vector<prepared_selector> r;
|
|
r.reserve(raws.size());
|
|
for (auto&& raw : raws) {
|
|
r.emplace_back(prepared_selector{
|
|
.expr = expr::prepare_expression(raw->selectable_, db, ks, &schema, nullptr),
|
|
.alias = raw->alias,
|
|
});
|
|
}
|
|
return r;
|
|
}
|
|
|
|
bool
|
|
processes_selection(const prepared_selector& ps) {
|
|
return selectable_processes_selection(ps.expr);
|
|
}
|
|
|
|
}
|
|
|
|
}
|