Table of Contents

Class AvroLogicalType

Namespace
AvroSharp.Schemas
Assembly
AvroSharp.dll

A logical type annotating a primitive or fixed schema. Parameterless logical types are singletons; decimal is represented by DecimalLogicalType.

public abstract class AvroLogicalType
Inheritance
AvroLogicalType
Derived
Inherited Members

Remarks

As the specification requires, unknown or invalid logical types are ignored when parsing: the schema then has no LogicalType, and the original attributes are kept in Properties.

Properties

BigDecimal

Gets the big-decimal logical type.

Date

Gets the date logical type.

Duration

Gets the duration logical type.

Kind

Gets the kind of logical type.

LocalTimestampMicros

Gets the local-timestamp-micros logical type.

LocalTimestampMillis

Gets the local-timestamp-millis logical type.

LocalTimestampNanos

Gets the local-timestamp-nanos logical type.

Name

Gets the name used in the logicalType attribute.

TimeMicros

Gets the time-micros logical type.

TimeMillis

Gets the time-millis logical type.

TimestampMicros

Gets the timestamp-micros logical type.

TimestampMillis

Gets the timestamp-millis logical type.

TimestampNanos

Gets the timestamp-nanos logical type.

Uuid

Gets the uuid logical type.

Methods

Decimal(int, int)

Creates a decimal logical type.

IsValidFor(AvroSchema)

Returns true when this logical type may annotate schema (for example date on int, or a decimal whose precision fits the fixed size).

ToString()

Returns a string that represents the current object.