class SQLite3::Database::FunctionProxy

with the create methods mentioned above.
This class will almost always be instantiated indirectly, by working
the function object.
provides more convenient access to the API functions that operate on
opaque function object that represents the current invocation. It also
#create_aggregate, and #create_aggregate_handler). It encapsulates the
A helper class for dealing with custom functions (see #create_function,

def []( key )

available to aggregate functions.
Returns the value with the given key from the context. This is only
def []( key )
  @context[ key ]
end

def []=( key, value )

available to aggregate functions.
Sets the value with the given key in the context. This is only
def []=( key, value )
  @context[ key ] = value
end

def count

row, and so will always return at least 1.
that the aggregate has processed so far. This will include the current
(Only available to aggregate functions.) Returns the number of rows
def count
  @driver.aggregate_count( @func )
end

def initialize

the context functions will be available.
it is non-nil, it must quack like a Hash. If it is nil, then none of
If context is non-nil, the functions context will be set to that. If
Create a new FunctionProxy that encapsulates the given +func+ object.
def initialize
  @result   = nil
  @context  = {}
end

def set_error( error )

The function will then return that error.
Set the result of the function to the given error message.
def set_error( error )
  @driver.result_error( @func, error.to_s, -1 )
end