Socket
Socket
Sign inDemoInstall

aerospike

Package Overview
Dependencies
Maintainers
3
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aerospike - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

14

History.md

@@ -0,1 +1,13 @@

v2.4.1 / 2016-10-10
===================
* **Bug Fixes**
* Fix write operator to support double values. [#148](https://github.com/aerospike/aerospike-client-nodejs/issues/148) Thanks to [@OlegPoberegets](https://github.com/OlegPoberegets)!
* **Changes**
* Renamed Cluster ID to Cluster Name; Cluster Name verification requires Aerospike Server v3.10 or later.
* **Updates**
* Update C client library to [v4.1.1](http://www.aerospike.com/download/client/c/notes.html#4.1.1).
v2.4.0 / 2016-09-09

@@ -18,3 +30,3 @@ ===================

* **Changes**
* **Updates**
* Update C client library to [v4.1.0](http://www.aerospike.com/download/client/c/notes.html#4.1.0).

@@ -21,0 +33,0 @@ * Shared memory layout has changed in v4.1.0 of the C client library. See

13

lib/config.js

@@ -67,11 +67,12 @@ // *****************************************************************************

/**
* @name Config#clusterID
* @summary Expected cluster ID.
* @description If not <code>null</code>, server nodes must return this cluster ID
* in order to join the client's view of the cluster. Should only be set when
* connecting to servers that support the "cluster-id" info command.
* @name Config#clusterName
* @summary Expected Cluster Name.
* @description If not <code>null</code>, server nodes must return this
* cluster name in order to join the client's view of the cluster. Should
* only be set when connecting to servers that support the "cluster-name"
* info command.
* @type {string}
* @since v2.4
*/
this.clusterID = config.clusterID
this.clusterName = config.clusterName

@@ -78,0 +79,0 @@ /**

@@ -560,2 +560,47 @@ // *****************************************************************************

// pending server-side support for list increment operation [AER-5149]
//
// /**
// * Increments the value at the given list index and returns the final result.
// *
// * @param {string} bin - The name of the bin. The bin must contain a List value.
// * @param {number} index - Index of the list element to increment.
// * @param {number} value - Value to increment the element by.
// * @returns {Object} Operation that can be passed to the {@link Client#operate} command.
// *
// * @since v2.4
// *
// * @example
// *
// * const Aerospike = require('aerospike')
// * const op = Aerospike.operator
// * const key = new Aerospike.Key('test', 'demo', 'mykey1')
// *
// * var ops = [
// * op.listIncrement('counters', 1, 3)
// * ]
// *
// * Aerospike.client().connect((error, client) => {
// * if (error) throw error
// * client.put(key, { counters: [1, 2, 3] }, (error) => {
// * if (error) throw error
// * client.operate(key, ops, (error, result) => {
// * if (error) throw error
// * console.log(result['counters']) => 5
// * client.get(key, (error, record) => {
// * if (error) throw error
// * console.log(record) // => { counters: [1, 5, 3] }
// * client.close()
// * })
// * })
// * })
// * })
// */
// increment: function increment (bin, index, value) {
// var op = new ListOperation(opcodes.LIST_INCREMENT, bin)
// op.index = index
// op.value = value
// return op
// },
/**

@@ -562,0 +607,0 @@ * Returns the element count of the list

{
"name": "aerospike",
"version": "2.4.0",
"version": "2.4.1",
"description": "Aerospike Client Library",

@@ -5,0 +5,0 @@ "tags": [

@@ -13,3 +13,3 @@ # Aerospike Node.js Client [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]

This module is compatible with Node.js v0.12.x, io.js, v4.x, v5.x, v6.x and supports the following operating systems:
CentOS/RHEL 6.x, Debian 7/8, Ubuntu 12.04+, Fedora 20+, Korora 22+, Linuxmint and Mac OS X.
CentOS/RHEL 6+, Debian 7/8, Ubuntu 12.04+, Fedora 20+, Korora 22+, Linuxmint and Mac OS X.

@@ -125,3 +125,3 @@ - [Usage](#Usage)

### CentOS/RHEL 6.x
### CentOS/RHEL 6+

@@ -128,0 +128,0 @@ To install library prerequisites via `yum`:

@@ -247,2 +247,13 @@ // *****************************************************************************

// pending server-side support for list increment operation [AER-5149]
describe.skip('lists.increment', function () {
it('increments the element at the specified index and returns the final value', function (done) {
var record = { list: [1, 2, 3, 4, 5] }
var operation = lists.increment('list', 1, 3)
var expectedResult = { list: 5 }
var expectedRecord = { list: [1, 5, 3, 4, 5] }
verifyOperation(record, operation, expectedResult, expectedRecord, done)
})
})
describe('lists.size', function () {

@@ -249,0 +260,0 @@ it('returns the element count', function (done) {

@@ -71,6 +71,6 @@ // *****************************************************************************

context('cluster ID', function () {
it('should fail to connect to the cluster if the cluster ID does not match', function (done) {
context('cluster name', function () {
it('should fail to connect to the cluster if the cluster name does not match', function (done) {
var config = extend({}, helper.config)
config.clusterID = 'notAValidClusterId'
config.clusterName = 'notAValidClusterName'
client = new Client(config)

@@ -77,0 +77,0 @@

@@ -39,3 +39,3 @@ // *****************************************************************************

var obj = {
clusterID: 'testCluster',
clusterName: 'testCluster',
hosts: [ { addr: 'localhost', port: 3000 } ],

@@ -53,3 +53,3 @@ log: { level: 1, file: 2 },

var config = new Config(obj)
expect(config).to.have.property('clusterID')
expect(config).to.have.property('clusterName')
expect(config).to.have.property('hosts')

@@ -56,0 +56,0 @@ expect(config).to.have.property('log')

@@ -34,4 +34,30 @@ // *****************************************************************************

describe('operations.write()', function () {
it('should write a bin with a double value', function (done) {
var key = keygen.string(helper.namespace, helper.set, {prefix: 'test/op.write/double'})()
client.put(key, { bin1: 1.23, bin2: new Double(1.0) }, function (err) {
if (err) throw err
var ops = [
op.write('bin1', 2.34),
op.write('bin2', new Double(2.0))
]
client.operate(key, ops, function (err, result) {
if (err) throw err
client.get(key, function (err, record) {
if (err) throw err
expect(record).to.eql({ bin1: 2.34, bin2: 2.0 })
client.remove(key, function (err) {
if (err) throw err
done()
})
})
})
})
})
it('should delete a bin by writing null to it', function (done) {
var key = keygen.string(helper.namespace, helper.set, {prefix: 'test/incr/int'})()
var key = keygen.string(helper.namespace, helper.set, {prefix: 'test/op.write/null'})()

@@ -38,0 +64,0 @@ client.put(key, {bin1: 123, bin2: 456}, function (err) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc