Module: Avro::LogicalTypes

Defined in:
lib/avro/logical_types.rb

Defined Under Namespace

Modules: Identity, IntDate, TimestampMicros, TimestampMillis

Constant Summary collapse

TYPES =
{
  "int" => {
    "date" => IntDate
  },
  "long" => {
    "timestamp-millis" => TimestampMillis,
    "timestamp-micros" => TimestampMicros
  },
}.freeze

Class Method Summary collapse

Class Method Details

.type_adapter(type, logical_type) ⇒ Object



78
79
80
81
82
# File 'lib/avro/logical_types.rb', line 78

def self.type_adapter(type, logical_type)
  return unless logical_type

  TYPES.fetch(type, {}).fetch(logical_type, Identity)
end