Module: SchemaPlus::Functions::Middleware::Dumper::Tables
- Defined in:
- lib/schema_plus/functions/middleware.rb
Instance Method Summary collapse
-
#after(env) ⇒ Object
Dump.
Instance Method Details
#after(env) ⇒ Object
Dump
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/schema_plus/functions/middleware.rb', line 8 def after(env) env.connection.functions.each do |(function_name, params, )| full_params, definition, function_type = env.connection.function_definition(function_name, params) heredelim = "END_FUNCTION_#{function_name.upcase}" = ", function_type: :#{function_type}" if function_type.present? statement = " create_function \"\#{function_name}\", \"\#{full_params}\", <<-'\#{heredelim}', :force => true\#{extra_options}\n \#{definition}\n \#{heredelim}\n ENDFUNCTION\n\n env.dump.final << statement\n end\nend\n" |