Module avro_primitive

.

Authors: Ilya Staheev (ilya.staheev@klarna.com).

Description

Data Types

array_type()

array_type() = #avro_array_type{type = avro:type_or_name(), custom = [avro:custom_prop()]}

avro_type()

avro_type() = primitive_type() | array_type() | enum_type() | fixed_type() | map_type() | record_type() | union_type()

avro_value()

avro_value() = avro:canonicalized_value() | #avro_value{type = avro:type_or_name(), data = avro:avro_value()} | [#avro_value{type = avro:type_or_name(), data = avro:avro_value()}] | [{avro:name(), #avro_value{type = avro:type_or_name(), data = avro:avro_value()}}] | avro_map:data() | {json, binary()} | {binary, binary()}

canonicalized_value()

canonicalized_value() = null | boolean() | integer() | float() | binary()

custom_prop()

custom_prop() = {custom_prop_name(), custom_prop_value()}

custom_prop_name()

custom_prop_name() = binary()

custom_prop_value()

custom_prop_value() = jsone:json_value()

enum_type()

enum_type() = #avro_enum_type{name = avro:name(), namespace = avro:namespace(), aliases = [avro:name()], doc = avro:typedoc(), symbols = [avro:enum_symbol()], fullname = avro:fullname(), custom = [avro:custom_prop()]}

fixed_type()

fixed_type() = #avro_fixed_type{name = avro:name(), namespace = avro:namespace(), aliases = [avro:name()], size = pos_integer(), fullname = avro:fullname(), custom = [avro:custom_prop()]}

map_type()

map_type() = #avro_map_type{type = avro:type_or_name(), custom = [avro:custom_prop()]}

name_raw()

name_raw() = atom() | string() | binary()

primitive_type()

primitive_type() = #avro_primitive_type{name = avro:name(), custom = [avro:custom_prop()]}

record_type()

record_type() = #avro_record_type{name = avro:name(), namespace = avro:namespace(), doc = avro:typedoc(), aliases = [avro:name()], fields = [avro:record_field()], fullname = avro:fullname(), custom = [avro:custom_prop()]}

union_type()

union_type() = #avro_union_type{id2type = avro_union:id2type(), name2id = avro_union:name2id()}

Function Index

boolean/1
boolean_type/0
bytes/1
bytes_type/0
cast/2
double/1
double_type/0
float/1
float_type/0
get_value/1
int/1
int_type/0
long/1
long_type/0
null/0
null_type/0
string/1
string_type/0
type/2

Function Details

boolean/1

boolean(Value) -> any()

boolean_type/0

boolean_type() -> any()

bytes/1

bytes(Value) -> any()

bytes_type/0

bytes_type() -> any()

cast/2

cast(Type::avro_type(), Value::term()) -> {ok, avro_value()} | {error, term()}

double/1

double(Value) -> any()

double_type/0

double_type() -> any()

float/1

float(Value) -> any()

float_type/0

float_type() -> any()

get_value/1

get_value(Value::avro_value()) -> canonicalized_value()

int/1

int(Value) -> any()

int_type/0

int_type() -> any()

long/1

long(Value) -> any()

long_type/0

long_type() -> any()

null/0

null() -> any()

null_type/0

null_type() -> any()

string/1

string(Value) -> any()

string_type/0

string_type() -> any()

type/2

type(Name0::name_raw(), CustomProps::[custom_prop()]) -> primitive_type()


Generated by EDoc