A simple wrapper for Aerospike's Erlang driver
Add the following tuple to your dependencies list
{:ex_aerospike, ">= 0.0.1"}
Connecting to an Aerospike database
client = ExAerospike.connect('127.0.0.1', 6000)
Disconnecting
client |> ExAerospike.close
Changing the namespace
client |> ExAerospike.namespace('myNamespace')
Changing the set
client |> ExAerospike.set('mySetName')
Fetching a bin from a key
client |> ExAerospike.get('key', 'binName')
Fetching all values from a key
client |> ExAerospike.get('key')
Writing a record
client |> ExAerospike.write('key', 'bin', 'value')
# or
client |> ExAerospike.write('key', ['bin': 'value'])
# for multiple bins
client |> ExAerospike.write('key', ['bin': 'value', 'anotherBin': 'another value'])
Deleting a record
client |> ExAerospike.delete('key')