Class: DbDiff::Delta::AddFunction

Inherits:
DbDiff::Delta show all
Defined in:
lib/dbdiff/delta.rb

Instance Attribute Summary

Attributes inherited from DbDiff::Delta

#element

Instance Method Summary collapse

Methods inherited from DbDiff::Delta

#initialize, #table, #to_a

Constructor Details

This class inherits a constructor from DbDiff::Delta

Instance Method Details

#process(database) ⇒ Object



294
295
296
# File 'lib/dbdiff/delta.rb', line 294

def process(database)
  database.functions << element
end

#sqlObject



290
291
292
# File 'lib/dbdiff/delta.rb', line 290

def sql
  return "CREATE FUNCTION `#{element.name}` (#{element.param_list}) RETURNS #{element.returns} #{element.definition}" 
end