Module riakc_datatype

When used with riakc_pb_socket:fetch_type() and riakc_pb_socket:update_type(), modules implementing this behaviour provide an internally consistent local view of the data while capturing update operations for shipping back to the server.

This module defines the riakc_datatype behaviour.
Required callback functions: new/0, new/1, new/2, value/1, to_op/1, is_type/1, type/0.

Description

When used with riakc_pb_socket:fetch_type() and riakc_pb_socket:update_type(), modules implementing this behaviour provide an internally consistent local view of the data while capturing update operations for shipping back to the server.

Data Types

context()

context() = maybe(binary())

datatype()

datatype() = term()

maybe()

maybe(T) = T | undefined

typename()

typename() = atom()

update()

update(T) = maybe({typename(), T, context()})

Function Index

module_for_term/1Returns the appropriate container module for the given term, if possible.
module_for_type/1

Function Details

module_for_term/1

module_for_term(T::datatype()) -> maybe(module())

Returns the appropriate container module for the given term, if possible.

module_for_type/1

module_for_type(Type::atom()) -> module()


Generated by EDoc, Dec 16 2016, 16:38:08.