Class Sequel::SQLTime
In: lib/sequel/sql.rb
Parent: ::Time

Time subclass that gets literalized with only the time value, so it operates like a standard SQL time type.

Methods

create   to_s  

Public Class methods

Create a new SQLTime instance given an hour, minute, and second.

[Source]

    # File lib/sequel/sql.rb, line 47
47:     def self.create(hour, minute, second, usec = 0)
48:       t = now
49:       local(t.year, t.month, t.day, hour, minute, second, usec)
50:     end

Public Instance methods

Return a string in HH:MM:SS format representing the time.

[Source]

    # File lib/sequel/sql.rb, line 53
53:     def to_s(*args)
54:       if args.empty?
55:         strftime('%H:%M:%S')
56:       else
57:         # Superclass may have defined a method that takes a format string,
58:         # and we shouldn't override in that case.
59:         super
60:       end
61:     end

[Validate]