A wrapper around a proc for use as an SQLite Ddatabase fuction
f = Function.new( 'md5', lambda { |x| Digest::MD5.hexdigest( x.to_s ) } )
The arity of SQL function, -1 means it is takes a variable number of arguments.
# File lib/amalgalite/sqlite3/database/function.rb, line 37 def arity @function.arity end
Invoke the proc
# File lib/amalgalite/sqlite3/database/function.rb, line 43 def call( *args ) @function.call( *args ) end
The unique signature of this function
# File lib/amalgalite/sqlite3/database/function.rb, line 29 def signature @signature ||= Function.signature( name, arity ) end
Generated with the Darkfish Rdoc Generator 2.