Class: DuckDB::AggregateFunctionSet
- Inherits:
-
Object
- Object
- DuckDB::AggregateFunctionSet
- Defined in:
- lib/duckdb/aggregate_function_set.rb,
ext/duckdb/aggregate_function_set.c
Overview
Note:
DuckDB::AggregateFunctionSet is experimental.
DuckDB::AggregateFunctionSet encapsulates DuckDB’s aggregate function set, which allows registering multiple overloads of an aggregate function under one name.
Instance Method Summary collapse
- #add(aggregate_function) ⇒ self
-
#initialize(name) ⇒ AggregateFunctionSet
constructor
A new instance of AggregateFunctionSet.
Constructor Details
#initialize(name) ⇒ AggregateFunctionSet
Returns a new instance of AggregateFunctionSet.
11 12 13 14 15 |
# 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 |
Instance Method Details
#add(aggregate_function) ⇒ self
21 22 23 24 25 26 27 |
# 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 |