Sha256: cb38bf38d3bc51c5e8fe63b55c6a75e35a6e71e417d2415373793c2e0d3d5fd7

Contents?: true

Size: 203 Bytes

Versions: 15

Compression:

Stored size: 203 Bytes

Contents

# Time extensions.
class Time
  SQL_FORMAT = "TIMESTAMP '%Y-%m-%d %H:%M:%S'".freeze
  
  # Formats the Time object as an SQL TIMESTAMP.
  def to_sql_timestamp
    strftime(SQL_FORMAT)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sequel-0.0.13 lib/sequel/core_ext.rb
sequel-0.0.15 lib/sequel/core_ext.rb
sequel-0.0.14 lib/sequel/core_ext.rb
sequel-0.0.12 lib/sequel/core_ext.rb
sequel-0.0.10 lib/sequel/core_ext.rb
sequel-0.0.11 lib/sequel/core_ext.rb
sequel-0.0.1 lib/sequel/core_ext.rb
sequel-0.0.9 lib/sequel/core_ext.rb
sequel-0.0.5 lib/sequel/core_ext.rb
sequel-0.0.3 lib/sequel/core_ext.rb
sequel-0.0.6 lib/sequel/core_ext.rb
sequel-0.0.7 lib/sequel/core_ext.rb
sequel-0.0.2 lib/sequel/core_ext.rb
sequel-0.0.4 lib/sequel/core_ext.rb
sequel-0.0.8 lib/sequel/core_ext.rb