class SQLite3::Database
def create_function name, arity, text_rep=Constants::TextRep::UTF8, &block
end
end
func.result = value.split(//).sort.join
else
func.result = nil
if value.nil?
db.create_function( "maim", 1 ) do |func, value|
Example:
indicate the return value that way.
the FunctionProxy#result= method on the +func+ parameter and
The block does not return a value directly. Instead, it will invoke
arguments it needs (up to its arity).
instance that wraps this function invocation--and any other
The block should accept at least one parameter--the FunctionProxy
-1 for the arity.)
+name+, with the given +arity+. (For variable arity functions, use
Creates a new function for use in SQL statements. It will be added as
def create_function name, arity, text_rep=Constants::TextRep::UTF8, &block define_function_with_flags(name, text_rep) do |*args| fp = FunctionProxy.new block.call(fp, *args) fp.result end self end