mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-23 01:50:35 +00:00
Previously, we moved cql3::functions::function to the db::functions namespace, since functions are a part of the data dictionary, which is independent of cql3. We do the same now for scalar_function, since we wish to make use of it in a new db::functions::stateless_aggregate_function. A stub remains in cql3/functions to avoid churn.
33 lines
680 B
C++
33 lines
680 B
C++
/*
|
|
* Copyright (C) 2014-present ScyllaDB
|
|
*
|
|
* Modified by ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "bytes.hh"
|
|
#include "function.hh"
|
|
#include <vector>
|
|
|
|
namespace db::functions {
|
|
|
|
class scalar_function : public virtual function {
|
|
public:
|
|
/**
|
|
* Applies this function to the specified parameter.
|
|
*
|
|
* @param parameters the input parameters
|
|
* @return the result of applying this function to the parameter
|
|
* @throws InvalidRequestException if this function cannot not be applied to the parameter
|
|
*/
|
|
virtual bytes_opt execute(const std::vector<bytes_opt>& parameters) = 0;
|
|
};
|
|
|
|
|
|
}
|