class DuckDB::AggregateFunctionSet
DuckDB::AggregateFunctionSet encapsulates DuckDB’s aggregate function set, which allows registering multiple overloads of an aggregate function under one name.
@note DuckDB::AggregateFunctionSet is experimental.
Public Class Methods
Source
# File lib/duckdb/aggregate_function_set.rb, line 11 def initialize(name) raise TypeError, "#{name.class} is not a String or Symbol" unless name.is_a?(String) || name.is_a?(Symbol) _initialize(name.to_s) end
@param name [String, Symbol] the function set name shared by all overloads @raise [TypeError] if name is not a String or Symbol
Public Instance Methods
Source
# File lib/duckdb/aggregate_function_set.rb, line 21 def add(aggregate_function) unless aggregate_function.is_a?(DuckDB::AggregateFunction) raise TypeError, "#{aggregate_function.class} is not a DuckDB::AggregateFunction" end _add(aggregate_function) end
@param aggregate_function [DuckDB::AggregateFunction] the overload to add @return [self] @raise [TypeError] if aggregate_function is not a DuckDB::AggregateFunction @raise [DuckDB::Error] if the overload already exists in the set