1.0.27 • Published 7 years ago

aerospike-leveldown v1.0.27

Weekly downloads
3
License
MIT
Repository
github
Last release
7 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

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

8 years ago

1.0.22

8 years ago

1.0.21

8 years ago

1.0.20

8 years ago

1.0.19

8 years ago

1.0.18

8 years ago

1.0.17

8 years ago

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago