class SQLite3::Database::FunctionProxy

def ensure_aggregate!

existence of the context variable.
being invoked is an aggregate function. This is implied by the
A function for performing a sanity check, to ensure that the function
def ensure_aggregate!
  unless @context
    raise MisuseException, "function is not an aggregate"
  end
end