array_type() = #avro_array_type{type = avro:type_or_name(), custom = [avro:custom_prop()]}
avro_type() = primitive_type() | array_type() | enum_type() | fixed_type() | map_type() | record_type() | union_type()
decoder_hook_fun() = fun((avro_type(), name() | integer(), avro:in(), fun((avro:in()) -> avro:out())) -> avro:out())
decoder_options() = #{encoding := avro_binary | avro_json, map_type := proplist | map, record_type := proplist | map, is_wrapped := boolean(), hook := decoder_hook_fun()}
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()]}
filename() = file:filename_all()
fixed_type() = #avro_fixed_type{name = avro:name(), namespace = avro:namespace(), aliases = [avro:name()], size = pos_integer(), fullname = avro:fullname(), custom = [avro:custom_prop()]}
fullname() = binary()
abstract datatype: header()
lkup() = schema_store() | lkup_fun()
lkup_fun() = fun((fullname()) -> avro_type())
map_type() = #avro_map_type{type = avro:type_or_name(), custom = [avro:custom_prop()]}
meta() = [{string() | binary(), binary()}]
name() = binary()
name_raw() = atom() | string() | binary()
primitive_type() = #avro_primitive_type{name = avro:name(), custom = [avro:custom_prop()]}
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()]}
schema_store() = avro_schema_store:store()
type_or_name() = avro_type() | name_raw()
union_type() = #avro_union_type{id2type = avro_union:id2type(), name2id = avro_union:name2id()}
append_file/3 | Append encoded objects to the file as one data block. |
append_file/5 | Encode the given objects and append to the file as one data block. |
decode_binary/1 | decode_binary/2 equivalent with default decoder options. |
decode_binary/2 | Decode ocf binary into unwrapped values. |
decode_file/1 | decode_file/2 equivalent with default decoder options. |
decode_file/2 | Decode ocf into unwrapped values. |
make_header/1 | Make ocf header. |
make_header/2 | Make ocf header, and append the given metadata fields. |
make_ocf/2 | |
write_file/4 | Write objects in a single block to the given file name. |
write_file/5 | Write objects in a single block to the given file name with custom metadata. |
write_header/2 | Writer header bytes to a ocf file. |
append_file(Fd::file:io_device(), Header::header(), Objects::[binary()]) -> ok
Append encoded objects to the file as one data block.
append_file(Fd::file:io_device(), Header::header(), Lkup::lkup(), Schema::type_or_name(), Objects::[avro:in()]) -> ok
Encode the given objects and append to the file as one data block.
decode_binary(Bin::binary()) -> {header(), avro_type(), [avro:out()]}
decode_binary/2 equivalent with default decoder options.
decode_binary(Bin::binary(), Options::decoder_options()) -> {header(), avro_type(), [avro:out()]}
Decode ocf binary into unwrapped values.
decode_file(Filename::filename()) -> {header(), avro_type(), [avro:out()]}
decode_file/2 equivalent with default decoder options.
decode_file(Filename::filename(), Options::decoder_options()) -> {header(), avro_type(), [avro:out()]}
Decode ocf into unwrapped values.
make_header(Type::avro_type()) -> header()
Make ocf header.
make_header(Type::avro_type(), Meta0::meta()) -> header()
Make ocf header, and append the given metadata fields.
You can use >>"avro.codec"<<
metadata field to choose what data
block coding should be used. Supported values are >>"null"<<
(default) and >>"deflate"<<
(compressed). Other values in
avro
namespace are reserved for internal use and can't be set.
Other than that you are free to provide any custom metadata.
make_ocf(Header::header(), Objects::[binary()]) -> iodata()
write_file(Filename::filename(), Lkup::lkup(), Schema::type_or_name(), Objects::[avro:in()]) -> ok
Write objects in a single block to the given file name.
write_file(Filename::filename(), Lkup::lkup(), Schema::type_or_name(), Objects::[avro:in()], Meta::meta()) -> ok
Write objects in a single block to the given file name with custom metadata. @see make_header/2 for details about use of meta data.
write_header(Fd::file:io_device(), Header::header()) -> ok
Writer header bytes to a ocf file.
Generated by EDoc