Class: Axiom::Attribute::Time

Inherits:
Object show all
Includes:
Comparable
Defined in:
lib/axiom/attribute/time.rb

Overview

Represents a Time value in a relation tuple

Constant Summary collapse

DEFAULT_RANGE =
(::Time.at(0)..::Time.at(2 ** 31-1)).freeze

Instance Attribute Summary

Attributes inherited from Axiom::Attribute

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Comparable

#asc, #desc

Methods included from Function::Predicate::GreaterThan::Methods

#gt

Methods included from Function::Predicate::GreaterThanOrEqualTo::Methods

#gte

Methods included from Function::Predicate::LessThan::Methods

#lt

Methods included from Function::Predicate::LessThanOrEqualTo::Methods

#lte

Methods included from Axiom::Aggregate::Minimum::Methods

#minimum

Methods included from Axiom::Aliasable

#inheritable_alias

Methods included from Axiom::Aggregate::Maximum::Methods

#maximum

Methods included from Axiom::Aggregate::Mean::Methods

#mean

Methods included from Axiom::Aggregate::Variance::Methods

#variance

Methods included from Axiom::Aggregate::StandardDeviation::Methods

#standard_deviation

Methods included from Function::Predicate::Equality::Methods

#eq

Methods included from Function::Predicate::Exclusion::Methods

#exclude

Methods included from Function::Predicate::Inequality::Methods

#ne

Methods included from Function::Predicate::Inclusion::Methods

#include

Methods included from Axiom::Aggregate::Count::Methods

#count

Methods inherited from Axiom::Attribute

#call, coerce, infer_type, #initialize, name_from, #rename, #required?, #type, #valid_primitive?, #valid_value?

Methods included from Visitable

#accept

Constructor Details

This class inherits a constructor from Axiom::Attribute

Class Method Details

.primitiveClass<::Time>

The Time primitive

Examples:

Time.primitive  # => ::Time

Returns:



20
21
22
# File 'lib/axiom/attribute/time.rb', line 20

def self.primitive
  ::Time
end

Instance Method Details

#rangeRange<::Time>

The Time range for a valid value

Examples:

Time.range  # => ::Time.utc(*from)..::Time.utc(*to)

Returns:



32
33
34
# File 'lib/axiom/attribute/time.rb', line 32

def range
  DEFAULT_RANGE
end