1.0.27 • Published 8 years ago

aerospike-leveldown v1.0.27

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Downloads Today Code Climate Dev Dependencies License

Aerospikedown

This is a LevelDOWN API compatible Aerospike adapter for LevelUP.

For more information about Level, see:

Installation

npm install aerospike-leveldown --save

Usage

'use strict';

let AerospikeLevelDOWN = require('aerospike-leveldown');
let levelup = require('levelup');
 
let db = levelup('/who/cares/', {
    db: function (location) {
        return new AerospikeLevelDOWN(location)
    },
    address: '127.0.0.1',
    port: 3000
});
 
// Namespace and set will be needed on every database operation 
// It indicates where to save data and where to retrieve data from 
let namespace_and_set = {
    namespace: 'test',
    set: 'anything'
};
 
// Save value bar with key foo in defined namespace and set
db.put('foo', 'bar', namespace_and_set, function (err) {
    if (err) throw err;
    // Get value from key foo in defined namespace and set
    db.get('foo', namespace_and_set, function (err, result) {
        if (err) throw err;
        console.log('Got foo =', result.value)
        // Delete key foo and its value in defined namespace and set
        db.del('foo', namespace_and_set, function (err) {
            if (err) throw err;
        })
    })
});

Author

Emanuele Mazzotta

License

MIT License © siroop AG

1.0.27

8 years ago

1.0.26

8 years ago

1.0.25

8 years ago

1.0.24

8 years ago

1.0.23

9 years ago

1.0.22

9 years ago

1.0.21

9 years ago

1.0.20

9 years ago

1.0.19

9 years ago

1.0.18

9 years ago

1.0.17

9 years ago

1.0.16

9 years ago

1.0.15

9 years ago

1.0.14

9 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago