ExRiak v0.4.0 ExRiak.Metadata View Source

Module to work with Metadata from ExRiak.Object.

Link to this section Summary

Functions

Adds a secondary index to the metatadata

Clear all secondary indexes on this metadata

Clears all metadata entries

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

Set a secondary index on the metadata

Link to this section Types

Link to this section Functions

Link to this function add_secondary_index(metadata, index) View Source
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.

See :riakc_obj.add_secondary_index/2.

Link to this function clear_secondary_indexes(metadata) View Source
clear_secondary_indexes(t()) :: t()

Clear all secondary indexes on this metadata.

See :riakc_obj.clear_secondary_indexes/2.

Link to this function clear_user_entries(metadata) View Source
clear_user_entries(t()) :: t()

Clears all metadata entries.

See :riakc_obj.clear_user_metadata_entries/1.

Link to this function delete_secondary_index(metadata, secondary_index_id) View Source
delete_secondary_index(t(), secondary_index_id()) :: t()

Delete a secondary index by id.

See :riakc_obj.delete_secondary_index/2.

Link to this function delete_user_entry(metadata, metadata_key) View Source
delete_user_entry(t(), key()) :: t()

Deletes a specific metadata entry.

See :riakc_obj.delete_user_metadata_entry/2.

Link to this function get_content_type(metadata) View Source
get_content_type(t()) :: content_type() | :undefined

Returns the content type from metadata

Link to this function get_secondary_index(metadata, secondary_index_id, default \\ nil) View Source
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).

See :riakc_obj.get_secondary_index/2.

Link to this function get_secondary_indexes(metadata) View Source
get_secondary_indexes(t()) :: [secondary_index()]

Gets all secondary indexes in this Metadata.

See :riakc_obj.get_secondary_indexes/1.

Link to this function get_user_entries(metadata) View Source
get_user_entries(t()) :: [entry()]

Get all metadata entries.

See :riakc_obj.get_user_metadata_entries/1.

Link to this function get_user_entry(metadata, metadata_key, default \\ nil) View Source
get_user_entry(t(), key(), default :: term()) :: value() | term()

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).

See :riakc_obj.get_user_metadata_entry/2.

Link to this function set_secondary_index(metadata, indexes) View Source
set_secondary_index(t(), secondary_index() | [secondary_index()]) :: t()

Set a secondary index on the metadata.

See :riakc_obj.set_secondary_index/2.

Link to this function set_user_entry(metadata, metadata_entry) View Source
set_user_entry(t(), entry()) :: t()

Sets a metadata entry.

See :riakc_obj.set_user_metadata_entry/2.