Module: Sequel::CurrentDateTimeTimestamp::DatasetMethods

Defined in:
lib/sequel/extensions/current_datetime_timestamp.rb

Instance Method Summary collapse

Instance Method Details

#current_datetimeObject

Return an instance of Sequel.datetime_class that will be literalized as CURRENT_TIMESTAMP.



34
35
36
# File 'lib/sequel/extensions/current_datetime_timestamp.rb', line 34

def current_datetime
  (Sequel.datetime_class == ::Time ? Time : DateTime).now
end