Marten::DB::Field::Duration
Inherits Marten::DB::Field::Base / Reference / Object
A duration model field.
Duration fields are persisted as big integers (number of nanoseconds) in the underlying database. They are
converted to Time::Span objects when the corresponding values are read from the database.
Constructors
new(id : ::String, primary_key = false, default : Time::Span | Nil = nil, blank = false, null = false, unique = false, index = false, db_column = nil)
SourceInstance methods
Extracts the field value from a DB result set and returns the right object corresponding to this value.