--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: func, *args
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new function for use in SQL statements. It will be added as <tt>name</tt>, with the given <tt>arity</tt>. (For variable arity functions, use -1 for the arity.)
- !ruby/struct:SM::Flow::P 
  body: The block should accept at least one parameter--the FunctionProxy instance that wraps this function invocation--and any other arguments it needs (up to its arity).
- !ruby/struct:SM::Flow::P 
  body: The block does not return a value directly. Instead, it will invoke the FunctionProxy#set_result method on the <tt>func</tt> parameter and indicate the return value that way.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  db.create_function( &quot;maim&quot;, 1 ) do |func, value|\n    if value.nil?\n      func.result = nil\n    else\n      func.result = value.split(//).sort.join\n    end\n  end\n\n  puts db.get_first_value( &quot;select maim(name) from table&quot; )\n"
full_name: SQLite3::Database#create_function
is_singleton: false
name: create_function
params: ( name, arity, text_rep=Constants::TextRep::ANY ) {|func, *args| ...}
visibility: public
