ExRiak v0.4.0 ExRiak.Metadata View Source
Module to work with Metadata from ExRiak.Object
.
Link to this section Summary
Types
Content type of an ExRiak.Object
’s value
Functions
Adds a secondary index to the metatadata
Clear all secondary indexes on this metadata
Clears all metadata entries
Delete a secondary index by id
Deletes a specific metadata entry
Returns the content type from metadata
Gets the value(s) for a specific secondary index
Gets all secondary indexes in this Metadata
Get all metadata entries
Get specific metadata entry
Set a secondary index on the metadata
Sets a metadata entry
Link to this section Types
binary_index() :: {ExRiak.SecondaryIndex.binary_index_id(), [ExRiak.SecondaryIndex.binary_index_value()]}
Content type of an ExRiak.Object
’s value
integer_index() :: {ExRiak.SecondaryIndex.integer_index_id(), [ExRiak.SecondaryIndex.integer_index_value()]}
secondary_index() :: binary_index() | integer_index()
secondary_index_id() :: ExRiak.SecondaryIndex.index_id()
secondary_index_value() :: ExRiak.SecondaryIndex.index_value()
Link to this section Functions
add_secondary_index(t(), secondary_index() | [secondary_index()]) :: t()
Adds a secondary index to the metatadata.
If a value is already set for an index, it appends the new value to the list.
Clear all secondary indexes on this metadata.
Clears all metadata entries.
delete_secondary_index(t(), secondary_index_id()) :: t()
Delete a secondary index by id.
Deletes a specific metadata entry.
get_content_type(t()) :: content_type() | :undefined
Returns the content type from metadata
get_secondary_index(t(), secondary_index_id(), default :: term()) :: [secondary_index_value()] | term()
Gets the value(s) for a specific secondary index.
If secondary_index_id
is present in the list of secondary indexes, then
the associated values are returned. Otherwise default
is returned (which is
nil
unless specified otherwise).
get_secondary_indexes(t()) :: [secondary_index()]
Gets all secondary indexes in this Metadata.
Get all metadata entries.
Get specific metadata entry.
If metadata_key
is present in the user metadata with then the associated
value is returned. Otherwise default
is returned (which is nil
unless
specified otherwise).
set_secondary_index(t(), secondary_index() | [secondary_index()]) :: t()
Set a secondary index on the metadata.
Sets a metadata entry.