Socket
Socket
Sign inDemoInstall

aerospike

Package Overview
Dependencies
Maintainers
5
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 5.3.0 to 5.4.0

scripts/build-c-client.sh-cclient-output.log

1

lib/lists.js

@@ -302,2 +302,3 @@ // *****************************************************************************

* for range read.
* @property {number} EXISTS - Return true if count > 0.
*/

@@ -304,0 +305,0 @@ exports.returnType = as.lists.returnType

5

lib/maps.js

@@ -327,4 +327,7 @@ // *****************************************************************************

* for range read.
* @property {number} KEY_VALUE - Return map items keys and values as an Array,
* @property {number} KEY_VALUE - Return map items keys and values as an Array.
* i.e. [key1, value1, key2, value2, ...].
* @property {number} EXISTS - Return true if count > 0.
* @property {number} UNORDERED_MAP - Return an unordered map.
* @property {number} ORDERED_MAP - Return an ordered map.
*/

@@ -331,0 +334,0 @@ exports.returnType = as.maps.returnType

{
"name": "aerospike",
"version": "5.3.0",
"version": "5.4.0",
"description": "Aerospike Client Library",

@@ -42,3 +42,3 @@ "keywords": [

"preinstall": "npm install @mapbox/node-pre-gyp",
"install": "node ./scripts/prebuiltBinding.js; node-pre-gyp install --fallback-to-build;",
"install": "node ./scripts/prebuiltBinding.js; node-pre-gyp install --fallback-to-build",
"postinstall": "node scripts/postinstall.js",

@@ -45,0 +45,0 @@ "test": "mocha",

@@ -17,4 +17,5 @@ # Aerospike Node.js Client [![travis][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]

- RHEL 8/9
- Debian 10/11
- Ubuntu 18.04/20.04/22.04 (Focal, Jammy, Bionic)
- Debian 10 (x86_64 architecture only)
- Debian 11
- Ubuntu 20.04/22.04 (Focal Fossa, Jammy Jellyfish)
- Many Linux distributions compatible with one of the above OS releases.

@@ -21,0 +22,0 @@ - macOS versions 11/12/13 are also supported. (Node.js 14 install unavailable on M1 Mac systems)

@@ -39,2 +39,11 @@ // *****************************************************************************

const orderMap = (key, bin, order, ctx) => {
const policy = new Aerospike.MapPolicy({ order })
const setMapPolicy = Aerospike.maps.setPolicy(bin, policy)
if (ctx) setMapPolicy.withContext(ctx)
return client.operate(key, [setMapPolicy])
}
const orderByKey = (key, bin, ctx) => orderMap(key, bin, Aerospike.maps.order.KEY_ORDERED, ctx)
async function createRecord (bins, meta = null) {

@@ -80,2 +89,34 @@ const key = keygen.string(helper.namespace, helper.set, { prefix: 'test/exp' })()

describe('eq on map bin', function () {
it('evaluates to true if a map bin matches a value', async function () {
const key = await createRecord({ map: { c: 1, b: 2, a: 3 } })
await orderByKey(key, 'map')
await testNoMatch(key, exp.eq(exp.map({ d: 4, e: 5 }), exp.binMap('map')))
await testMatch(key, exp.eq(exp.map({ c: 1, b: 2, a: 3 }), exp.binMap('map')))
})
it('evaluates to true if a map bin matches a map bin', async function () {
const key = await createRecord({ map: { c: 1, b: 2, a: 3 }, map2: { c: 1, b: 2, a: 3 }, map3: { c: 1, b: 2 } })
await orderByKey(key, 'map')
await testNoMatch(key, exp.eq(exp.binMap('map'), exp.binMap('map3')))
await testMatch(key, exp.eq(exp.binMap('map'), exp.binMap('map2')))
})
})
describe('eq on list bin', function () {
it('evaluates to true if a list bin matches a value', async function () {
const key = await createRecord({ list: [4, 2, 0] })
await orderByKey(key, 'map')
await testNoMatch(key, exp.eq(exp.list([0, 2, 4]), exp.binList('list')))
await testMatch(key, exp.eq(exp.list([4, 2, 0]), exp.binList('list')))
})
it('evaluates to true if a list bin matches a list bin', async function () {
const key = await createRecord({ list: [4, 2, 0], list2: [4, 2, 0], list3: [4, 2] })
await orderByKey(key, 'map')
await testNoMatch(key, exp.eq(exp.binList('list'), exp.binList('list3')))
await testMatch(key, exp.eq(exp.binList('list'), exp.binList('list2')))
})
})
describe('eq on blob bin', function () {

@@ -82,0 +123,0 @@ it('evaluates to true if a blob bin matches a value', async function () {

@@ -81,3 +81,3 @@ // *****************************************************************************

expect(bins.l).to.eql(Buffer.from([0x93, 0x01, 0x02, 0x03]))
expect(bins.m).to.eql(Buffer.from([0x83, 0xa2, 0x03, 0x61, 0x01, 0xa2, 0x03, 0x62, 0x02, 0xa2, 0x03, 0x63, 0x03]))
expect(bins.m).to.eql(Buffer.from([0x84, 0xc7, 0x00, 0x01, 0xc0, 0xa2, 0x03, 0x61, 0x01, 0xa2, 0x03, 0x62, 0x02, 0xa2, 0x03, 0x63, 0x03]))
})

@@ -84,0 +84,0 @@ })

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

})
it('returns key/value for a single read', function () {
return initState()
.then(createRecord({ map: { a: 1, b: 2, c: 3 } }))
.then(orderByKey('map'))
.then(operate(maps.getByIndex('map', 0, maps.returnType.ORDERED_MAP)))
.then(assertResultEql({ map: { a: 1 } }))
.then(cleanup())
})
it('returns key/value for a range read', function () {
return initState()
.then(createRecord({ map: { a: 1, b: 2, c: 3 } }))
.then(orderByKey('map'))
.then(operate(maps.getByIndexRange('map', 0, 2, maps.returnType.ORDERED_MAP)))
.then(assertResultEql({ map: { a: 1, b: 2 } }))
.then(cleanup())
})
it('returns key/value for a single read', function () {
return initState()
.then(createRecord({ map: { a: 1, b: 2, c: 3 } }))
.then(orderByKey('map'))
.then(operate(maps.getByIndex('map', 0, maps.returnType.UNORDERED_MAP)))
.then(assertResultEql({ map: { a: 1 } }))
.then(cleanup())
})
it('returns key/value for a range read', function () {
return initState()
.then(createRecord({ map: { a: 1, b: 2, c: 3 } }))
.then(orderByKey('map'))
.then(operate(maps.getByIndexRange('map', 0, 2, maps.returnType.UNORDERED_MAP)))
.then(assertResultEql({ map: { a: 1, b: 2 } }))
.then(cleanup())
})
})
})

@@ -327,3 +327,3 @@ // *****************************************************************************

expect(record.bins.list).to.eql(Buffer.from([0x93, 0x01, 0x02, 0x03]))
expect(record.bins.map).to.eql(Buffer.from([0x83, 0xa2, 0x03, 0x61, 0x01, 0xa2, 0x03, 0x62, 0x02, 0xa2, 0x03, 0x63, 0x03]))
expect(record.bins.map).to.eql(Buffer.from([0x84, 0xc7, 0x00, 0x01, 0xc0, 0xa2, 0x03, 0x61, 0x01, 0xa2, 0x03, 0x62, 0x02, 0xa2, 0x03, 0x63, 0x03]))
})

@@ -330,0 +330,0 @@ })

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

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

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

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

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

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

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