123456789_123456789_123456789_123456789_123456789_

Class: SQLite3::Database::AggregatorFactory

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/sqlite3/database.rb

Overview

The "handler" that #define_aggregator hands to define_aggregator2, which only needs something that responds to .new (a fresh aggregator for each aggregate invocation) and #arity.

Class Method Summary

Instance Method Summary

  • #arity

    this is what sqlite3_obj_method_arity did before.

  • #new

Constructor Details

.new(template) ⇒ AggregatorFactory

[ GitHub ]

  
# File 'lib/sqlite3/database.rb', line 586

def initialize(template)
  @template = template
end

Instance Method Details

#arity

this is what sqlite3_obj_method_arity did before

[ GitHub ]

  
# File 'lib/sqlite3/database.rb', line 595

def arity
  @template.method(:step).arity
end

#new

[ GitHub ]

  
# File 'lib/sqlite3/database.rb', line 590

def new
  @template.clone
end