Module: ArSchemaFunctions::Extensions::PostgreSQLSchemaDumper
- Defined in:
- lib/ar_schema_functions/extensions.rb
Instance Method Summary collapse
Instance Method Details
#functions(stream) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ar_schema_functions/extensions.rb', line 20 def functions(stream) functions = @connection.functions return unless functions.any? functions.each do |function| indented_function = function.lines.map { |line| " #{line}" }.join stream.puts " connection.execute(<<~SQL)\n#{indented_function} SQL" stream.puts end end |