Now that we don't accept cql protocol version 1 or 2, we can drop cql_serialization format everywhere, except when in the IDL (since it's part of the inter-node protocol). A few functions had duplicate versions, one with and one without a cql_serialization_format parameter. They are deduplicated. Care is taken that `partition_slice`, which communicates the cql_serialization_format across nodes, still presents a valid cql_serialization_format to other nodes when transmitting itself and rejects protocol 1 and 2 serialization\ format when receiving. The IDL is unchanged. One test checking the 16-bit serialization format is removed.
36 lines
696 B
C++
36 lines
696 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 cql3 {
|
|
|
|
namespace 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;
|
|
};
|
|
|
|
|
|
}
|
|
}
|