Files
scylladb/db/functions/scalar_function.hh
Avi Kivity 82c4341e0e db, cql3: move scalar_function from cql3/functions to db/functions
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.
2023-03-15 20:37:25 +02:00

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;
};
}