avro-0.6.1.2: Avro serialization support for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Avro

Description

Avro encoding and decoding routines.

This library provides a high level interface for encoding and decoding Haskell values in Apache's Avro serialization format.

Synopsis

Schema

data Schema Source #

N.B. It is possible to create a Haskell value (of Schema type) that is not a valid Avro schema by violating one of the above or one of the conditions called out in validateSchema.

Bundled Patterns

pattern Int' :: Schema 
pattern Long' :: Schema 
pattern Bytes' :: Schema 
pattern String' :: Schema 

Instances

Instances details
FromJSON Schema Source # 
Instance details

Defined in Data.Avro.Schema.Schema

ToJSON Schema Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Generic Schema Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep Schema :: Type -> Type #

Methods

from :: Schema -> Rep Schema x #

to :: Rep Schema x -> Schema #

Show Schema Source # 
Instance details

Defined in Data.Avro.Schema.Schema

NFData Schema Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: Schema -> () #

Eq Schema Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

(==) :: Schema -> Schema -> Bool #

(/=) :: Schema -> Schema -> Bool #

Ord Schema Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Lift Schema Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => Schema -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Schema -> Code m Schema #

type Rep Schema Source # 
Instance details

Defined in Data.Avro.Schema.Schema

type Rep Schema = D1 ('MetaData "Schema" "Data.Avro.Schema.Schema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'False) (((C1 ('MetaCons "Null" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Boolean" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Int" 'PrefixI 'True) (S1 ('MetaSel ('Just "logicalTypeI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LogicalTypeInt))))) :+: ((C1 ('MetaCons "Long" 'PrefixI 'True) (S1 ('MetaSel ('Just "logicalTypeL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LogicalTypeLong))) :+: C1 ('MetaCons "Float" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Double" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Bytes" 'PrefixI 'True) (S1 ('MetaSel ('Just "logicalTypeB") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LogicalTypeBytes)))))) :+: (((C1 ('MetaCons "String" 'PrefixI 'True) (S1 ('MetaSel ('Just "logicalTypeS") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LogicalTypeString))) :+: C1 ('MetaCons "Array" 'PrefixI 'True) (S1 ('MetaSel ('Just "item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Schema))) :+: (C1 ('MetaCons "Map" 'PrefixI 'True) (S1 ('MetaSel ('Just "values") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Schema)) :+: C1 ('MetaCons "NamedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TypeName)))) :+: ((C1 ('MetaCons "Record" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TypeName) :*: S1 ('MetaSel ('Just "aliases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [TypeName])) :*: (S1 ('MetaSel ('Just "doc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "fields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Field]))) :+: C1 ('MetaCons "Enum" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TypeName) :*: S1 ('MetaSel ('Just "aliases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [TypeName])) :*: (S1 ('MetaSel ('Just "doc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "symbols") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Vector Text))))) :+: (C1 ('MetaCons "Union" 'PrefixI 'True) (S1 ('MetaSel ('Just "options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Vector Schema))) :+: C1 ('MetaCons "Fixed" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TypeName) :*: S1 ('MetaSel ('Just "aliases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [TypeName])) :*: (S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "logicalTypeF") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LogicalTypeFixed))))))))

data Field Source #

Instances

Instances details
Generic Field Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep Field :: Type -> Type #

Methods

from :: Field -> Rep Field x #

to :: Rep Field x -> Field #

Show Field Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

showsPrec :: Int -> Field -> ShowS #

show :: Field -> String #

showList :: [Field] -> ShowS #

NFData Field Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: Field -> () #

Eq Field Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

(==) :: Field -> Field -> Bool #

(/=) :: Field -> Field -> Bool #

Ord Field Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

compare :: Field -> Field -> Ordering #

(<) :: Field -> Field -> Bool #

(<=) :: Field -> Field -> Bool #

(>) :: Field -> Field -> Bool #

(>=) :: Field -> Field -> Bool #

max :: Field -> Field -> Field #

min :: Field -> Field -> Field #

Lift Field Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => Field -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Field -> Code m Field #

type Rep Field Source # 
Instance details

Defined in Data.Avro.Schema.Schema

data Order Source #

Constructors

Ascending 
Descending 
Ignore 

Instances

Instances details
FromJSON Order Source # 
Instance details

Defined in Data.Avro.Schema.Schema

ToJSON Order Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Generic Order Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep Order :: Type -> Type #

Methods

from :: Order -> Rep Order x #

to :: Rep Order x -> Order #

Show Order Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

showsPrec :: Int -> Order -> ShowS #

show :: Order -> String #

showList :: [Order] -> ShowS #

NFData Order Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: Order -> () #

Eq Order Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

(==) :: Order -> Order -> Bool #

(/=) :: Order -> Order -> Bool #

Ord Order Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

compare :: Order -> Order -> Ordering #

(<) :: Order -> Order -> Bool #

(<=) :: Order -> Order -> Bool #

(>) :: Order -> Order -> Bool #

(>=) :: Order -> Order -> Bool #

max :: Order -> Order -> Order #

min :: Order -> Order -> Order #

Lift Order Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => Order -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Order -> Code m Order #

type Rep Order Source # 
Instance details

Defined in Data.Avro.Schema.Schema

type Rep Order = D1 ('MetaData "Order" "Data.Avro.Schema.Schema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'False) (C1 ('MetaCons "Ascending" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Descending" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Ignore" 'PrefixI 'False) (U1 :: Type -> Type)))

data TypeName Source #

A named type in Avro has a name and, optionally, a namespace.

A name is a string that starts with an ASCII letter or underscore followed by letters, underscores and digits:

name ::= [A-Za-z_][A-Za-z0-9_]*

Examples include "_foo7", Bar_ and "x".

A namespace is a sequence of names with the same lexical structure. When written as a string, the components of a namespace are separated with dots ("com.example").

TypeName represents a fullname—a name combined with a namespace. These are written and parsed as dot-separated strings. The TypeName TN Foo ["com", "example"] is rendered as "com.example.Foo".

Fullnames have to be globally unique inside an Avro schema.

A namespace of [] or [""] is the "null namespace". In avro an explicitly null-namespaced identifier is written as ".Foo"

Constructors

TN 

Fields

Instances

Instances details
IsString TypeName Source #

This lets us write TypeNames as string literals in a fully qualified style. "com.example.foo" is the name "foo" with the namespace "com.example"; "foo" is the name "foo" with no namespace.

Instance details

Defined in Data.Avro.Schema.Schema

Generic TypeName Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep TypeName :: Type -> Type #

Methods

from :: TypeName -> Rep TypeName x #

to :: Rep TypeName x -> TypeName #

Show TypeName Source #

Show the TypeName as a string literal compatible with its IsString instance.

Instance details

Defined in Data.Avro.Schema.Schema

NFData TypeName Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: TypeName -> () #

Eq TypeName Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Ord TypeName Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Hashable TypeName Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

hashWithSalt :: Int -> TypeName -> Int #

hash :: TypeName -> Int #

Lift TypeName Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => TypeName -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => TypeName -> Code m TypeName #

type Rep TypeName Source # 
Instance details

Defined in Data.Avro.Schema.Schema

type Rep TypeName = D1 ('MetaData "TypeName" "Data.Avro.Schema.Schema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'False) (C1 ('MetaCons "TN" 'PrefixI 'True) (S1 ('MetaSel ('Just "baseName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "namespace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text])))

data Decimal Source #

The decimal logical type represents arbitrary-precision decimal numbers. Numbers are represented as unscaled * (10 ** -scale) where scale is part of the logical type and unscaled is an integer represented by the underlying primitive type.

Instances of the decimal logical type need to specify a scale and precision.

decimal can be encoded as one of several different primitive types:

  • bytes
  • fixed
  • long
  • int

For long and int, unscaled is the underlying number.

For bytes and fixed, unscaled is represented as a two's-complement signed integer in big-endian byte order.

Note: int and long representations for decimal are not part of the current Avro specification, but they are supported by some language implementations including the official Java library. Implementations that do not support this should ignore the logical type and use the underlying primitive type instead.

Constructors

Decimal 

Fields

  • precision :: Integer

    The maximum number of digits that can be represented by this decimal type.

    precision > 0
  • scale :: Integer

    The scale in unscaled * (10 ** -scale) for this type.

    0 ≤ scale ≤ precision

Instances

Instances details
Generic Decimal Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep Decimal :: Type -> Type #

Methods

from :: Decimal -> Rep Decimal x #

to :: Rep Decimal x -> Decimal #

Show Decimal Source # 
Instance details

Defined in Data.Avro.Schema.Schema

NFData Decimal Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: Decimal -> () #

Eq Decimal Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

(==) :: Decimal -> Decimal -> Bool #

(/=) :: Decimal -> Decimal -> Bool #

Ord Decimal Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Lift Decimal Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => Decimal -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Decimal -> Code m Decimal #

type Rep Decimal Source # 
Instance details

Defined in Data.Avro.Schema.Schema

type Rep Decimal = D1 ('MetaData "Decimal" "Data.Avro.Schema.Schema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'False) (C1 ('MetaCons "Decimal" 'PrefixI 'True) (S1 ('MetaSel ('Just "precision") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel ('Just "scale") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer)))

newtype LogicalTypeBytes Source #

Constructors

DecimalB Decimal

An arbitrary-precision signed decimal number. See Decimal.

Instances

Instances details
Generic LogicalTypeBytes Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep LogicalTypeBytes :: Type -> Type #

Show LogicalTypeBytes Source # 
Instance details

Defined in Data.Avro.Schema.Schema

NFData LogicalTypeBytes Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: LogicalTypeBytes -> () #

Eq LogicalTypeBytes Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Ord LogicalTypeBytes Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Lift LogicalTypeBytes Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => LogicalTypeBytes -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => LogicalTypeBytes -> Code m LogicalTypeBytes #

type Rep LogicalTypeBytes Source # 
Instance details

Defined in Data.Avro.Schema.Schema

type Rep LogicalTypeBytes = D1 ('MetaData "LogicalTypeBytes" "Data.Avro.Schema.Schema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'True) (C1 ('MetaCons "DecimalB" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Decimal)))

data LogicalTypeFixed Source #

Constructors

DecimalF Decimal

An arbitrary-precision signed decimal number. See Decimal.

Duration

An interval of time, represented as some number of months, days and milliseconds.

Encoded as three little-endian unsigned integers for months, days and milliseconds respectively.

Instances

Instances details
Generic LogicalTypeFixed Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep LogicalTypeFixed :: Type -> Type #

Show LogicalTypeFixed Source # 
Instance details

Defined in Data.Avro.Schema.Schema

NFData LogicalTypeFixed Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: LogicalTypeFixed -> () #

Eq LogicalTypeFixed Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Ord LogicalTypeFixed Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Lift LogicalTypeFixed Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => LogicalTypeFixed -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => LogicalTypeFixed -> Code m LogicalTypeFixed #

type Rep LogicalTypeFixed Source # 
Instance details

Defined in Data.Avro.Schema.Schema

type Rep LogicalTypeFixed = D1 ('MetaData "LogicalTypeFixed" "Data.Avro.Schema.Schema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'False) (C1 ('MetaCons "DecimalF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Decimal)) :+: C1 ('MetaCons "Duration" 'PrefixI 'False) (U1 :: Type -> Type))

data LogicalTypeInt Source #

Constructors

DecimalI Decimal

An arbitrary-precision signed decimal number. See Decimal.

Date

A date (eg 2020-01-10) with no timezone/locale.

Encoded as the number of days before/after the Unix epoch (1970-01-01).

TimeMillis

A time of day with millisecond precision.

Encoded as the number of milliseconds after midnight.

Instances

Instances details
Generic LogicalTypeInt Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep LogicalTypeInt :: Type -> Type #

Show LogicalTypeInt Source # 
Instance details

Defined in Data.Avro.Schema.Schema

NFData LogicalTypeInt Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: LogicalTypeInt -> () #

Eq LogicalTypeInt Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Ord LogicalTypeInt Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Lift LogicalTypeInt Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => LogicalTypeInt -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => LogicalTypeInt -> Code m LogicalTypeInt #

type Rep LogicalTypeInt Source # 
Instance details

Defined in Data.Avro.Schema.Schema

type Rep LogicalTypeInt = D1 ('MetaData "LogicalTypeInt" "Data.Avro.Schema.Schema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'False) (C1 ('MetaCons "DecimalI" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Decimal)) :+: (C1 ('MetaCons "Date" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TimeMillis" 'PrefixI 'False) (U1 :: Type -> Type)))

data LogicalTypeLong Source #

Constructors

DecimalL Decimal

An arbitrary-precision signed decimal number. See Decimal.

TimeMicros

A time of day with microsecond precision.

Encoded as the number of microseconds after midnight.

TimestampMillis

A UTC timestamp with millisecond precision.

Encoded as the number of milliseconds before/after the Unix epoch (1970-01-01 00:00:00.000).

TimestampMicros

A UTC timestamp with microsecond precision.

Encoded as the number of microseconds before/after the Unix epoch (1970-01-01 00:00:00.000000).

LocalTimestampMillis

A timestamp in the local timezone, whatever that happens to be, with millisecond precision.

Encoded as the number of milliseconds before/after the Unix epoch (1970-01-01 00:00:00.000).

LocalTimestampMicros

A timestamp in the local timezone, whatever that happens to be, with microsecond precision.

Encoded as the number of microseconds before/after the Unix epoch (1970-01-01 00:00:00.000000).

Instances

Instances details
Generic LogicalTypeLong Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep LogicalTypeLong :: Type -> Type #

Show LogicalTypeLong Source # 
Instance details

Defined in Data.Avro.Schema.Schema

NFData LogicalTypeLong Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: LogicalTypeLong -> () #

Eq LogicalTypeLong Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Ord LogicalTypeLong Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Lift LogicalTypeLong Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => LogicalTypeLong -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => LogicalTypeLong -> Code m LogicalTypeLong #

type Rep LogicalTypeLong Source # 
Instance details

Defined in Data.Avro.Schema.Schema

type Rep LogicalTypeLong = D1 ('MetaData "LogicalTypeLong" "Data.Avro.Schema.Schema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'False) ((C1 ('MetaCons "DecimalL" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Decimal)) :+: (C1 ('MetaCons "TimeMicros" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TimestampMillis" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TimestampMicros" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LocalTimestampMillis" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LocalTimestampMicros" 'PrefixI 'False) (U1 :: Type -> Type))))

data LogicalTypeString Source #

Constructors

UUID

A Universally Unique Identifier (UUID).

Encoded as a string that is valid according to RFC 4122.

Instances

Instances details
Generic LogicalTypeString Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Associated Types

type Rep LogicalTypeString :: Type -> Type #

Show LogicalTypeString Source # 
Instance details

Defined in Data.Avro.Schema.Schema

NFData LogicalTypeString Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Methods

rnf :: LogicalTypeString -> () #

Eq LogicalTypeString Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Ord LogicalTypeString Source # 
Instance details

Defined in Data.Avro.Schema.Schema

Lift LogicalTypeString Source # 
Instance details

Defined in Data.Avro.Deriving.Lift

Methods

lift :: Quote m => LogicalTypeString -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => LogicalTypeString -> Code m LogicalTypeString #

type Rep LogicalTypeString Source # 
Instance details

Defined in Data.Avro.Schema.Schema

type Rep LogicalTypeString = D1 ('MetaData "LogicalTypeString" "Data.Avro.Schema.Schema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'False) (C1 ('MetaCons "UUID" 'PrefixI 'False) (U1 :: Type -> Type))

Deconflicting schemas

data ReadSchema Source #

This type represents a deconflicted version of a Schema. Schema resolution is described in Avro specification: https://avro.apache.org/docs/current/spec.html#Schema+Resolution

This library represents "normal" schema and "deconflicted" schema as different types to avoid confusion between these two usecases (we shouldn't serialise values with such schema) and to be able to accomodate some extra information that links between how data is supposed transformed between what reader wants and what writer has.

Instances

Instances details
Generic ReadSchema Source # 
Instance details

Defined in Data.Avro.Schema.ReadSchema

Associated Types

type Rep ReadSchema :: Type -> Type #

Show ReadSchema Source # 
Instance details

Defined in Data.Avro.Schema.ReadSchema

NFData ReadSchema Source # 
Instance details

Defined in Data.Avro.Schema.ReadSchema

Methods

rnf :: ReadSchema -> () #

Eq ReadSchema Source # 
Instance details

Defined in Data.Avro.Schema.ReadSchema

type Rep ReadSchema Source # 
Instance details

Defined in Data.Avro.Schema.ReadSchema

type Rep ReadSchema = D1 ('MetaData "ReadSchema" "Data.Avro.Schema.ReadSchema" "avro-0.6.1.2-CUddNuGftGHAxf2IYjn53O" 'False) ((((C1 ('MetaCons "Null" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Boolean" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Int" 'PrefixI 'True) (S1 ('MetaSel ('Just "logicalTypeI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LogicalTypeInt))) :+: C1 ('MetaCons "Long" 'PrefixI 'True) (S1 ('MetaSel ('Just "longReadFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ReadLong) :*: S1 ('MetaSel ('Just "logicalTypeL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LogicalTypeLong))))) :+: ((C1 ('MetaCons "Float" 'PrefixI 'True) (S1 ('MetaSel ('Just "floatReadFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ReadFloat)) :+: C1 ('MetaCons "Double" 'PrefixI 'True) (S1 ('MetaSel ('Just "doubleReadFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ReadDouble))) :+: (C1 ('MetaCons "Bytes" 'PrefixI 'True) (S1 ('MetaSel ('Just "logicalTypeB") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LogicalTypeBytes))) :+: C1 ('MetaCons "String" 'PrefixI 'True) (S1 ('MetaSel ('Just "logicalTypeS") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LogicalTypeString)))))) :+: (((C1 ('MetaCons "Array" 'PrefixI 'True) (S1 ('MetaSel ('Just "item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ReadSchema)) :+: C1 ('MetaCons "Map" 'PrefixI 'True) (S1 ('MetaSel ('Just "values") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ReadSchema))) :+: (C1 ('MetaCons "NamedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeName)) :+: C1 ('MetaCons "Record" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeName) :*: S1 ('MetaSel ('Just "aliases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TypeName])) :*: (S1 ('MetaSel ('Just "doc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "fields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ReadField]))))) :+: ((C1 ('MetaCons "Enum" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeName) :*: S1 ('MetaSel ('Just "aliases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TypeName])) :*: (S1 ('MetaSel ('Just "doc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "symbols") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Text)))) :+: C1 ('MetaCons "Union" 'PrefixI 'True) (S1 ('MetaSel ('Just "options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (Int, ReadSchema))))) :+: (C1 ('MetaCons "Fixed" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeName) :*: S1 ('MetaSel ('Just "aliases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TypeName])) :*: (S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "logicalTypeF") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LogicalTypeFixed)))) :+: C1 ('MetaCons "FreeUnion" 'PrefixI 'True) (S1 ('MetaSel ('Just "pos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "ty") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ReadSchema))))))

deconflict :: Schema -> Schema -> Either String ReadSchema Source #

deconflict writer reader will produce a schema that can decode with the writer's schema into the form specified by the reader's schema.

Schema resolution rules are described by the specification: https://avro.apache.org/docs/current/spec.html#Schema+Resolution

readSchemaFromSchema :: Schema -> ReadSchema Source #

Converts Schema into ReadSchema. This function may be useful when it is known that the writer and the reader schemas are the same.

Individual values

encodeValue :: (HasAvroSchema a, ToAvro a) => a -> ByteString Source #

Serialises an individual value into Avro using the schema from its coresponding HasAvroSchema instance.

encodeValueWithSchema :: ToAvro a => Schema -> a -> ByteString Source #

Serialises an individual value into Avro with the schema provided.

decodeValue :: forall a. (HasAvroSchema a, FromAvro a) => ByteString -> Either String a Source #

Deserialises an individual value from Avro using the schema from its coresponding HasAvroSchema.

NOTE: This function is only to be used when reader and writes schemas are known to be the same. Because only one schema is known at this point, and it is the reader schema, no decondlicting can be performed.

decodeValueWithSchema :: FromAvro a => ReadSchema -> ByteString -> Either String a Source #

Deserialises an individual value from Avro.

Working with containers

Decoding containers

decodeContainer :: forall a. (HasAvroSchema a, FromAvro a) => ByteString -> [Either String a] Source #

Decodes the container using a schema from HasAvroSchema as a reader schema.

Errors are reported as a part of the list and the list will stop at first error. This means that the consumer will get all the "good" content from the container until the error is detected, then this error and then the list is finished.

decodeContainerWithEmbeddedSchema :: forall a. FromAvro a => ByteString -> [Either String a] Source #

Decodes the container as a list of values of the requested type.

Errors are reported as a part of the list and the list will stop at first error. This means that the consumer will get all the "good" content from the container until the error is detected, then this error and then the list is finished.

decodeContainerWithReaderSchema :: forall a. FromAvro a => Schema -> ByteString -> [Either String a] Source #

Decodes the container as a list of values of the requested type.

The provided reader schema will be de-conflicted with the schema embedded with the container.

Errors are reported as a part of the list and the list will stop at first error. This means that the consumer will get all the "good" content from the container until the error is detected, then this error and then the list is finished.

encodeContainer :: forall a. (HasAvroSchema a, ToAvro a) => Codec -> [[a]] -> IO ByteString Source #

Encode chunks of values into a container, using 16 random bytes for the synchronization markers and a corresponding HasAvroSchema schema. Blocks are compressed (or not) according to the given Codec (nullCodec or deflateCodec).

encodeContainerWithSchema :: ToAvro a => Codec -> Schema -> [[a]] -> IO ByteString Source #

Encode chunks of values into a container, using 16 random bytes for the synchronization markers. Blocks are compressed (or not) according to the given Codec (nullCodec or deflateCodec).

encodeContainerWithSync :: ToAvro a => Codec -> Schema -> ByteString -> [[a]] -> ByteString Source #

Encode chunks of objects into a container, using the provided ByteString as the synchronization markers.

newSyncBytes :: IO ByteString Source #

Generates a new synchronization marker for encoding Avro containers

Extracting containers' data

extractContainerValuesBytes :: ByteString -> Either String (Schema, [Either String ByteString]) Source #

Splits container into a list of individual avro-encoded values.

This is particularly useful when slicing up containers into one or more smaller files. By extracting the original bytestring it is possible to avoid re-encoding data.

decodeContainerValuesBytes :: forall a. FromAvro a => Schema -> ByteString -> Either String (Schema, [Either String (a, ByteString)]) Source #

Splits container into a list of individual avro-encoded values. This version provides both encoded and decoded values.

This is particularly useful when slicing up containers into one or more smaller files. By extracting the original bytestring it is possible to avoid re-encoding data.

Classes

class ToAvro a Source #

Describes how to encode Haskell data types into Avro bytes

Minimal complete definition

toAvro

Instances

Instances details
ToAvro Int32 Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Int32 -> Builder Source #

ToAvro Int64 Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Int64 -> Builder Source #

ToAvro Word16 Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

ToAvro Word32 Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

ToAvro Word64 Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

ToAvro Word8 Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Word8 -> Builder Source #

ToAvro ByteString Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

ToAvro ByteString Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

ToAvro Text Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Text -> Builder Source #

ToAvro Text Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Text -> Builder Source #

ToAvro Day Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Day -> Builder Source #

ToAvro DiffTime Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

ToAvro UTCTime Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

ToAvro LocalTime Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

ToAvro UUID Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> UUID -> Builder Source #

ToAvro () Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> () -> Builder Source #

ToAvro Bool Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Bool -> Builder Source #

ToAvro Double Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

ToAvro Float Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Float -> Builder Source #

ToAvro Int Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Int -> Builder Source #

ToAvro a => ToAvro (Identity a) Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Identity a -> Builder Source #

ToAvro a => ToAvro (Vector a) Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Vector a -> Builder Source #

(Unbox a, ToAvro a) => ToAvro (Vector a) Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Vector a -> Builder Source #

ToAvro a => ToAvro (Maybe a) Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Maybe a -> Builder Source #

ToAvro a => ToAvro [a] Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> [a] -> Builder Source #

(KnownNat p, KnownNat s) => ToAvro (Decimal p s) Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Decimal p s -> Builder Source #

(ToAvro a, ToAvro b) => ToAvro (Either a b) Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Either a b -> Builder Source #

(Ix i, ToAvro a) => ToAvro (Array i a) Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Array i a -> Builder Source #

ToAvro a => ToAvro (Map Text a) Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

Methods

toAvro :: Schema -> Map Text a -> Builder Source #

ToAvro a => ToAvro (HashMap Text a) Source # 
Instance details

Defined in Data.Avro.Encoding.ToAvro

(ToAvro a, ToAvro b, ToAvro c) => ToAvro (Either3 a b c) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

toAvro :: Schema -> Either3 a b c -> Builder Source #

(ToAvro a, ToAvro b, ToAvro c, ToAvro d) => ToAvro (Either4 a b c d) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

toAvro :: Schema -> Either4 a b c d -> Builder Source #

(ToAvro a, ToAvro b, ToAvro c, ToAvro d, ToAvro e) => ToAvro (Either5 a b c d e) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

toAvro :: Schema -> Either5 a b c d e -> Builder Source #

(ToAvro a, ToAvro b, ToAvro c, ToAvro d, ToAvro e, ToAvro f) => ToAvro (Either6 a b c d e f) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

toAvro :: Schema -> Either6 a b c d e f -> Builder Source #

(ToAvro a, ToAvro b, ToAvro c, ToAvro d, ToAvro e, ToAvro f, ToAvro g) => ToAvro (Either7 a b c d e f g) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

toAvro :: Schema -> Either7 a b c d e f g -> Builder Source #

(ToAvro a, ToAvro b, ToAvro c, ToAvro d, ToAvro e, ToAvro f, ToAvro g, ToAvro h) => ToAvro (Either8 a b c d e f g h) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

toAvro :: Schema -> Either8 a b c d e f g h -> Builder Source #

(ToAvro a, ToAvro b, ToAvro c, ToAvro d, ToAvro e, ToAvro f, ToAvro g, ToAvro h, ToAvro i) => ToAvro (Either9 a b c d e f g h i) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

toAvro :: Schema -> Either9 a b c d e f g h i -> Builder Source #

(ToAvro a, ToAvro b, ToAvro c, ToAvro d, ToAvro e, ToAvro f, ToAvro g, ToAvro h, ToAvro i, ToAvro j) => ToAvro (Either10 a b c d e f g h i j) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

toAvro :: Schema -> Either10 a b c d e f g h i j -> Builder Source #

class FromAvro a Source #

Descrives how to convert a given intermediate Value into a Haskell data type.

Minimal complete definition

fromAvro

Instances

Instances details
FromAvro Int32 Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro Int64 Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro ByteString Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro ByteString Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro Text Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro Day Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro DiffTime Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro UTCTime Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro LocalTime Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro UUID Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro () Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro Bool Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro Double Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro Float Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro Int Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro a => FromAvro (Identity a) Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro a => FromAvro (Vector a) Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

(Unbox a, FromAvro a) => FromAvro (Vector a) Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro a => FromAvro (Maybe a) Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro a => FromAvro [a] Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

Methods

fromAvro :: Value -> Either String [a] Source #

(KnownNat p, KnownNat s) => FromAvro (Decimal p s) Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

(FromAvro a, FromAvro b) => FromAvro (Either a b) Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro a => FromAvro (Map Text a) Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

FromAvro a => FromAvro (HashMap Text a) Source # 
Instance details

Defined in Data.Avro.Encoding.FromAvro

(FromAvro a, FromAvro b, FromAvro c) => FromAvro (Either3 a b c) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

fromAvro :: Value -> Either String (Either3 a b c) Source #

(FromAvro a, FromAvro b, FromAvro c, FromAvro d) => FromAvro (Either4 a b c d) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

fromAvro :: Value -> Either String (Either4 a b c d) Source #

(FromAvro a, FromAvro b, FromAvro c, FromAvro d, FromAvro e) => FromAvro (Either5 a b c d e) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

fromAvro :: Value -> Either String (Either5 a b c d e) Source #

(FromAvro a, FromAvro b, FromAvro c, FromAvro d, FromAvro e, FromAvro f) => FromAvro (Either6 a b c d e f) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

fromAvro :: Value -> Either String (Either6 a b c d e f) Source #

(FromAvro a, FromAvro b, FromAvro c, FromAvro d, FromAvro e, FromAvro f, FromAvro g) => FromAvro (Either7 a b c d e f g) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

fromAvro :: Value -> Either String (Either7 a b c d e f g) Source #

(FromAvro a, FromAvro b, FromAvro c, FromAvro d, FromAvro e, FromAvro f, FromAvro g, FromAvro h) => FromAvro (Either8 a b c d e f g h) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

fromAvro :: Value -> Either String (Either8 a b c d e f g h) Source #

(FromAvro a, FromAvro b, FromAvro c, FromAvro d, FromAvro e, FromAvro f, FromAvro g, FromAvro h, FromAvro i) => FromAvro (Either9 a b c d e f g h i) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

fromAvro :: Value -> Either String (Either9 a b c d e f g h i) Source #

(FromAvro a, FromAvro b, FromAvro c, FromAvro d, FromAvro e, FromAvro f, FromAvro g, FromAvro h, FromAvro i, FromAvro j) => FromAvro (Either10 a b c d e f g h i j) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

fromAvro :: Value -> Either String (Either10 a b c d e f g h i j) Source #

Compression

data Codec Source #

A Codec allows for compression/decompression of a block in an Avro container according to the Avro spec.

deflateCodec :: Codec Source #

deflateCodec specifies deflate codec required by Avro spec. (see https://avro.apache.org/docs/1.8.1/spec.html#deflate)

class HasAvroSchema a where Source #

Instances

Instances details
HasAvroSchema Int16 Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Int32 Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Int64 Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Int8 Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Word16 Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Word32 Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Word64 Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Word8 Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema ByteString Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema ByteString Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Text Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Text Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Day Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema DiffTime Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema UTCTime Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema LocalTime Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema UUID Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema () Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

Methods

schema :: Tagged () Schema Source #

HasAvroSchema Bool Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Double Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Float Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema Int Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema (Identity a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema (Set a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

Methods

schema :: Tagged (Set a) Schema Source #

HasAvroSchema a => HasAvroSchema (Vector a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema (Vector a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema (Maybe a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema [a] Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

Methods

schema :: Tagged [a] Schema Source #

(KnownNat p, KnownNat s) => HasAvroSchema (Decimal p s) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

(HasAvroSchema a, HasAvroSchema b) => HasAvroSchema (Either a b) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

Methods

schema :: Tagged (Either a b) Schema Source #

(HasAvroSchema a, Ix i) => HasAvroSchema (Array i a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

Methods

schema :: Tagged (Array i a) Schema Source #

HasAvroSchema a => HasAvroSchema (Map Text a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema (Map Text a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema (Map String a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema (HashMap Text a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema (HashMap Text a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

HasAvroSchema a => HasAvroSchema (HashMap String a) Source # 
Instance details

Defined in Data.Avro.HasAvroSchema

(HasAvroSchema a, HasAvroSchema b, HasAvroSchema c) => HasAvroSchema (Either3 a b c) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

schema :: Tagged (Either3 a b c) Schema Source #

(HasAvroSchema a, HasAvroSchema b, HasAvroSchema c, HasAvroSchema d) => HasAvroSchema (Either4 a b c d) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

schema :: Tagged (Either4 a b c d) Schema Source #

(HasAvroSchema a, HasAvroSchema b, HasAvroSchema c, HasAvroSchema d, HasAvroSchema e) => HasAvroSchema (Either5 a b c d e) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

schema :: Tagged (Either5 a b c d e) Schema Source #

(HasAvroSchema a, HasAvroSchema b, HasAvroSchema c, HasAvroSchema d, HasAvroSchema e, HasAvroSchema f) => HasAvroSchema (Either6 a b c d e f) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

schema :: Tagged (Either6 a b c d e f) Schema Source #

(HasAvroSchema a, HasAvroSchema b, HasAvroSchema c, HasAvroSchema d, HasAvroSchema e, HasAvroSchema f, HasAvroSchema g) => HasAvroSchema (Either7 a b c d e f g) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

schema :: Tagged (Either7 a b c d e f g) Schema Source #

(HasAvroSchema a, HasAvroSchema b, HasAvroSchema c, HasAvroSchema d, HasAvroSchema e, HasAvroSchema f, HasAvroSchema g, HasAvroSchema h) => HasAvroSchema (Either8 a b c d e f g h) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

schema :: Tagged (Either8 a b c d e f g h) Schema Source #

(HasAvroSchema a, HasAvroSchema b, HasAvroSchema c, HasAvroSchema d, HasAvroSchema e, HasAvroSchema f, HasAvroSchema g, HasAvroSchema h, HasAvroSchema i) => HasAvroSchema (Either9 a b c d e f g h i) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

schema :: Tagged (Either9 a b c d e f g h i) Schema Source #

(HasAvroSchema a, HasAvroSchema b, HasAvroSchema c, HasAvroSchema d, HasAvroSchema e, HasAvroSchema f, HasAvroSchema g, HasAvroSchema h, HasAvroSchema i, HasAvroSchema j) => HasAvroSchema (Either10 a b c d e f g h i j) Source # 
Instance details

Defined in Data.Avro.EitherN

Methods

schema :: Tagged (Either10 a b c d e f g h i j) Schema Source #