struct DuckDB::TimeOfDay

Overview

Represents the TIME data type of SQL within DuckDB.

Defined in:

duckdb/time_of_day.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(hour : Int32, minute : Int32, second : Int32 = 0, microsecond : Int32 = 0) #

[View source]
def self.new(time : Time) #

NOTE It raises ArgumentError if time is not in UTC.

NOTE Beware the loss of precision in the fractional part (nanoseconds to microseconds)


[View source]
def self.new(span : Time::Span) #

NOTE It raises ArgumentError unless span is less than one day.

NOTE Beware of loss of precision for the fractional part (nanoseconds to microseconds).


[View source]
def self.new(string : String) #

[View source]
def self.new(microseconds : Int64) #

Initialize with microseconds since 00:00:00

NOTE It raises ArgumentError unless microseconds represent less than one day.


[View source]

Instance Method Detail

def ==(other : self) : Bool #

[View source]
def hour : Int32 #

[View source]
def microsecond : Int32 #

[View source]
def millisecond #

[View source]
def minute : Int32 #

[View source]
def second : Int32 #

[View source]
def submillisecond? #

[View source]
def subsecond? #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def to_span : Time::Span #

[View source]