NikolaMandic / ex_aerospike

aerospike wrapper in Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExAerospike Hex.pm


A simple wrapper for Aerospike's Erlang driver


Installation


Add the following tuple to your dependencies list

{:ex_aerospike, ">= 0.0.1"}

Usage

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

About

aerospike wrapper in Elixir

License:MIT License


Languages

Language:Elixir 100.0%