aero-aerospike
This client can be used as a standalone package (without using Aero). It is a lightweight wrapper built on top of the official node.js client. All API calls return bluebird promises.
Installation
Add aero-aerospike
to dependencies
in your package.json
:
"dependencies":
npm install
Usage with Aero
Add the database configuration to your config.json
:
"database":
Now you can subscribe to the event database ready
:
app
API
Creating a client
let aerospike = let db = aerospike db
aerospike.client
let db = aerospike
The configuration parameters are directly handed over to the Aerospike.client
constructor of the officia aerospike node library. Therefore you can also specify hosts
, log
, policies
and so on. host
is a shortcut notation added by this library. namespace
specifies the namespace you want to operate on.
get
db
set
db
Does not delete existing properties if the record already exists. Only updates the name
property.
remove
db
forEach
db
filter
db
getMany
db
ready
dbready
connect
db === dbready db