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



362
363
364
365
366
367
368
369
370
371
# File 'lib/scheman/views/mysql.rb', line 362

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