Module riak_pb_dt_codec

Data Types

all_type()

all_type() = toplevel_type() | embedded_type()

context()

context() = binary() | undefined

counter_op()

counter_op() = increment | decrement | {increment | decrement, integer()}

counter_value()

counter_value() = integer()

embedded_type()

embedded_type() = counter | set | register | flag | map

embedded_type_op()

embedded_type_op() = counter_op() | set_op() | register_op() | flag_op() | map_op()

embedded_value()

embedded_value() = counter_value() | set_value() | register_value() | flag_value() | map_value()

fetch_opt()

fetch_opt() = {r, quorum()} | {pr, quorum()} | basic_quorum | {basic_quorum, boolean()} | notfound_ok | {notfound_ok, boolean()} | {timeout, pos_integer()} | sloppy_quorum | {sloppy_quorum, boolean()} | {n_val, pos_integer()} | include_context | {include_context, boolean()}

fetch_response()

fetch_response() = {toplevel_type(), toplevel_value(), context()}

flag_op()

flag_op() = enable | disable

flag_value()

flag_value() = boolean()

gset_op()

gset_op() = simple_gset_op() | {update, [simple_gset_op()]}

gset_value()

gset_value() = [binary()]

hll_op()

hll_op() = {add, binary()} | {add_all, [binary()]}

hll_value()

hll_value() = number()

map_entry()

map_entry() = {map_field(), embedded_value()}

map_field()

map_field() = {binary(), embedded_type()}

map_op()

map_op() = simple_map_op() | {update, [simple_map_op()]}

map_value()

map_value() = [map_entry()]

quorum()

quorum() = riak_pb_kv_codec:quorum()

register_op()

register_op() = {assign, binary()}

register_value()

register_value() = binary()

set_op()

set_op() = simple_set_op() | {update, [simple_set_op()]}

set_value()

set_value() = [binary()]

simple_gset_op()

simple_gset_op() = {add, binary()} | {add_all, [binary()]}

simple_map_op()

simple_map_op() = {remove, map_field()} | {update, map_field(), embedded_type_op()}

simple_set_op()

simple_set_op() = {add, binary()} | {remove, binary()} | {add_all, [binary()]} | {remove_all, [binary()]}

toplevel_op()

toplevel_op() = counter_op() | gset_op() | set_op() | map_op() | hll_op()

toplevel_type()

toplevel_type() = counter | gset | set | map | hll

toplevel_value()

toplevel_value() = counter_value() | gset_value() | set_value() | map_value() | hll_value() | undefined

type_mappings()

type_mappings() = [{all_type(), module()}]

update()

update() = {toplevel_type(), toplevel_op(), context()}

update_opt()

update_opt() = {w, quorum()} | {dw, quorum()} | {pw, quorum()} | return_body | {return_body, boolean()} | {timeout, pos_integer()} | sloppy_quorum | {sloppy_quorum, boolean()} | {n_val, pos_integer()}

Function Index

decode_fetch_response/1Decodes a FetchResponse into tuple of type, value and context.
decode_operation/1Decodes a DtOperation message into a datatype-specific operation.
decode_operation/2
decode_update_response/3Decodes a DtUpdateResp message into erlang values.
encode_fetch_request/2Encodes a fetch request into a DtFetch message.
encode_fetch_request/3
encode_fetch_response/3Encodes the result of a fetch request into a FetchResponse message.
encode_fetch_response/4Encodes the result of a fetch request into a FetchResponse message.
encode_operation/2Encodes a datatype-specific operation into a DtOperation message.
encode_update_request/3Encodes an update request into a DtUpdate message.
encode_update_request/4
encode_update_response/4Encodes an update response into a DtUpdateResp message.
encode_update_response/5Encodes an update response into a DtUpdateResp message.
operation_type/1Returns the type that the DtOp message expects to be performed on.

Function Details

decode_fetch_response/1

decode_fetch_response(Dtfetchresp::#dtfetchresp{}) -> fetch_response() | {notfound, toplevel_type()}

Decodes a FetchResponse into tuple of type, value and context.

decode_operation/1

decode_operation(Dtop::#dtop{}) -> toplevel_op()

Decodes a DtOperation message into a datatype-specific operation.

decode_operation/2

decode_operation(Dtop::#dtop{}, Mods::type_mappings()) -> toplevel_op()

decode_update_response/3

decode_update_response(Dtupdateresp::#dtupdateresp{}, Type::toplevel_type(), ReturnBodyExpected::boolean()) -> ok | {ok, Key::binary()} | {Key::binary(), fetch_response()} | fetch_response()

Decodes a DtUpdateResp message into erlang values.

encode_fetch_request/2

encode_fetch_request(BucketAndType::{binary(), binary()}, Key::binary()) -> #dtfetchreq{}

Encodes a fetch request into a DtFetch message.

encode_fetch_request/3

encode_fetch_request(X1::{binary(), binary()}, Key::binary(), Options::[fetch_opt()]) -> #dtfetchreq{}

encode_fetch_response/3

encode_fetch_response(Type::toplevel_type(), Value::toplevel_value(), Context::context()) -> #dtfetchresp{}

Encodes the result of a fetch request into a FetchResponse message.

encode_fetch_response/4

encode_fetch_response(Type::toplevel_type(), Value::toplevel_value(), Context::context(), Mods::type_mappings()) -> #dtfetchresp{}

Encodes the result of a fetch request into a FetchResponse message.

encode_operation/2

encode_operation(Op::toplevel_op(), X2::toplevel_type()) -> #dtop{}

Encodes a datatype-specific operation into a DtOperation message.

encode_update_request/3

encode_update_request(BucketAndType::{binary(), binary()}, Key::binary() | undefined, Update::update()) -> #dtupdatereq{}

Encodes an update request into a DtUpdate message.

encode_update_request/4

encode_update_request(X1::{binary(), binary()}, Key::binary() | undefined, X3::update(), Options::[update_opt()]) -> #dtupdatereq{}

encode_update_response/4

encode_update_response(Type::toplevel_type(), Value::toplevel_value(), Key::binary(), Context::context()) -> #dtupdateresp{}

Encodes an update response into a DtUpdateResp message.

encode_update_response/5

encode_update_response(X1::toplevel_type(), Value::toplevel_value(), Key::binary(), Context::context(), Mods::type_mappings()) -> #dtupdateresp{}

Encodes an update response into a DtUpdateResp message.

operation_type/1

operation_type(Dtop::#dtop{}) -> toplevel_type()

Returns the type that the DtOp message expects to be performed on.


Generated by EDoc