Class: Scheman::Views::Mysql::DefaultValue

Inherits:
Node
  • Object
show all
Defined in:
lib/scheman/views/mysql.rb

Instance Method Summary collapse

Methods inherited from Node

#initialize

Constructor Details

This class inherits a constructor from Scheman::Views::Mysql::Node

Instance Method Details

#to_sObject



353
354
355
356
357
358
359
360
361
362
# File 'lib/scheman/views/mysql.rb', line 353

def to_s
  case @element[:type]
  when "string"
    @element[:value].inspect
  when "current_timestamp"
    "CURRENT_TIMESTAMP()"
  else
    @element[:value]
  end
end