Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aerospike

Package Overview
Dependencies
Maintainers
5
Versions
138
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.1.0 to 5.1.1

benchmarks/.npmignore

23

lib/aerospike.js

@@ -317,3 +317,3 @@ // *****************************************************************************

*
*
*
* Aerospike.connect(config).then(async (client) => {

@@ -509,3 +509,3 @@ * const info = await client.infoAny().then(Aerospike.info.parse)

* @example <caption>Connection can be established using the {@link module:aerospike|aerospike} module.</caption>
*
*
* const Aerospike = require('aerospike')

@@ -517,10 +517,10 @@ *

* }
*
* Aerospike.connect(config, (err, client) => {
*
* Aerospike.connect(config, (err, client) => {
* console.log("Connected. Closing now.")
* client.close()
* })
*
*
* @example <caption>Connection can also be established using the {@link Client} module.</caption>
*
*
* const Aerospike = require('aerospike')

@@ -532,9 +532,9 @@ *

* }
*
*
* const client = Aerospike.client(config)
* client.connect((err) => {
* client.connect((err) => {
* console.log("Connected. Closing now.")
* client.close()
* })
*
*
* @example <caption>A connection established using callback function.</caption>

@@ -617,7 +617,7 @@ *

* }
*
*
* Aerospike.setDefaultLogging({
* level: Aerospike.log.TRACE
* })
*
*
* Aerospike.connect(config, (error, client) => {

@@ -656,3 +656,2 @@ * if (error) {

/**

@@ -659,0 +658,0 @@ * The {@link module:aerospike/batchType|aerospike/batch_type}

@@ -25,3 +25,3 @@ // *****************************************************************************

*
* @description Identifies batch record type with designated enumerated type
* @description Identifies batch record type with designated enumerated type
*/

@@ -57,3 +57,2 @@

}

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

class Config {

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

* const Aerospike = require('aerospike')
*
*
* let config = {

@@ -276,3 +275,3 @@ * hosts: '192.168.1.10,192.168.1.11',

* }
*
*
* let key = new Aerospike.Key('test', 'demo', 123)

@@ -310,3 +309,3 @@ *

* const Aerospike = require('aerospike')
*
*
* const fs = require('fs')

@@ -313,0 +312,0 @@ *

@@ -35,3 +35,3 @@ // *****************************************************************************

* const Double = Aerospike.Double
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -38,0 +38,0 @@ * var config = {

@@ -31,3 +31,3 @@ // *****************************************************************************

* const Aerospike = require('aerospike')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -42,3 +42,3 @@ * var config = {

* }
*
*
* let key = new Aerospike.Key('test', 'key', 'does_not_exist')

@@ -168,3 +168,3 @@ * Aerospike.connect()

* const Aerospike = require('aerospike')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -179,3 +179,3 @@ * var config = {

* }
*
*
* Aerospike.connect(config).then(async client => {

@@ -182,0 +182,0 @@ * await client.put(new Aerospike.Key('demo', 'test', 'foo'), { 'foo': 'bar' })

@@ -20,2 +20,6 @@ // *****************************************************************************

const _valueExp = (op, valName) => (value) => [{ op, [valName]: value }]
const _uint = _valueExp(exp.ops.VAL_UINT, 'uintVal')
const _int = _valueExp(exp.ops.VAL_INT, 'intVal')
const _rtype = _valueExp(exp.ops.VAL_RTYPE, 'intVal')
/*********************************************************************************

@@ -48,5 +52,6 @@ * BIT MODIFY EXPRESSIONS

]
/**
* @module aerospike/exp/bit
*
* @module aerospike/exp/bit
*
* @description The {@link module:aerospike/exp/bit|aerospike/exp/bit} module defines functions

@@ -387,2 +392,2 @@ * for expressions on the Blob datatype.

]
}
}

@@ -19,2 +19,6 @@ // *****************************************************************************

const hlls = as.hll
const _valueExp = (op, valName) => (value) => [{ op, [valName]: value }]
const _int = _valueExp(exp.ops.VAL_INT, 'intVal')
const _rtype = _valueExp(exp.ops.VAL_RTYPE, 'intVal')
/*********************************************************************************

@@ -48,9 +52,8 @@ * HLL MODIFY EXPRESSIONS

/**
* @module aerospike/exp/hll
*
* @module aerospike/exp/hll
*
* @description The {@link module:aerospike/exp/hll|aerospike/exp/hll} module defines functions
* for expressions on the HyperLogLog datatype.
*/
module.exports= {
module.exports = {
/**

@@ -57,0 +60,0 @@ * Create expression that creates a new HLL or resets an existing HLL with minhash bits.

@@ -21,11 +21,5 @@ // *****************************************************************************

/*********************************************************************************
* VALUE EXPRESSIONS
*********************************************************************************/
const _valueExp = (op, valName) => (value) => [{ op, [valName]: value }]
const _valueExpBytes = (op, valName, sizeName) => (value, size) => [{ op, [valName]: value, [sizeName]: size }]
const _int = _valueExp(exp.ops.VAL_INT, 'intVal')
const _rtype = _valueExp(exp.ops.VAL_RTYPE, 'intVal')
/*********************************************************************************

@@ -65,4 +59,2 @@ * LIST READ EXPRESSIONS

const _rtype = _valueExp(exp.ops.VAL_RTYPE, 'intVal')
const _listRead = (type, returnType, isMulti) => [

@@ -88,4 +80,4 @@ { op: exp.ops.CALL, count: 5 },

/**
* @module aerospike/exp/lists
*
* @module aerospike/exp/lists
*
* @description The {@link module:aerospike/exp/lists|aerospike/exp/lists} module defines functions

@@ -97,3 +89,3 @@ * for expressions on the List datatype.

* Create expression that returns list size.
*
*
* @param {Object} ctx Optional context path for nested CDT.

@@ -100,0 +92,0 @@ * @param {AerospikeExp} bin List bin or list value expression.

const as = require('bindings')('aerospike.node')
const exp = as.exp
const maps = as.maps
const cdtCtx = require('./cdt_context')
const _valueExp = (op, valName) => (value) => [{ op, [valName]: value }]
const _int = _valueExp(exp.ops.VAL_INT, 'intVal')
const _rtype = _valueExp(exp.ops.VAL_RTYPE, 'intVal')
/*********************************************************************************

@@ -62,4 +67,4 @@ * MAP MODIFY EXPRESSIONS

/**
* @module aerospike/exp/maps
*
* @module aerospike/exp/maps
*
* @description The {@link module:aerospike/exp/maps|aerospike/exp/maps} module defines functions

@@ -731,2 +736,2 @@ * for expressions on the Map datatype.

]
}
}

@@ -37,3 +37,3 @@ // *****************************************************************************

* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!
* const config = {
* const config = {
* hosts: '192.168.33.10:3000',

@@ -46,3 +46,3 @@ * // Timeouts disabled, latency dependent on server location. Configure as needed.

* }
*
*
* var ops = [

@@ -85,3 +85,2 @@ * op.append('a', 'xyz'),

class ExpOperation {
constructor (op, bin, exp, flags, props) {

@@ -88,0 +87,0 @@ this.op = op

@@ -21,8 +21,2 @@ // *****************************************************************************

const exp = as.exp
const lists = as.lists
const maps = as.maps
const bits = as.bitwise
const hlls = as.hll
const cdtCtx = require('./cdt_context')
const BIN_TYPE_UNDEF = 0

@@ -35,4 +29,4 @@

* @description This module defines a filter expression that is
* a mechanism for additional filtering.
*
* a mechanism for additional filtering.
*
* The resultset of a primary index (PI) query (scan) or secondary

@@ -56,3 +50,3 @@ * index (SI) query operation can be filtered through the QueryPolicy

* @example
*
*
* <caption>Expressions using the operate API</caption>

@@ -66,3 +60,3 @@ * const Aerospike = require('aerospike')

* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!
* const config = {
* const config = {
* hosts: '192.168.33.10:3000',

@@ -75,3 +69,3 @@ * // Timeouts disabled, latency dependent on server location. Configure as needed.

* }
*
*
* var ops = [

@@ -98,5 +92,5 @@ * op.append('a', 'xyz'),

* })
*
*
* @example
*
*
* <caption>Expressions using the query API</caption>

@@ -110,3 +104,3 @@ * const Aerospike = require('aerospike')

* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!
* const config = {
* const config = {
* hosts: '192.168.33.10:3000',

@@ -119,3 +113,3 @@ * // Timeouts disabled, latency dependent on server location. Configure as needed.

* }
*
*
* Aerospike.connect(config, (error, client) => {

@@ -134,3 +128,3 @@ * if (error) throw error

* stream.on('data', (record) => {
* console.info(record.bins) // => { a: 'abc', b: 42}
* console.info(record.bins) // => { a: 'abc', b: 42}
* })

@@ -142,3 +136,3 @@ * stream.on('end', () => {

* })
*
*
*/

@@ -178,3 +172,2 @@

exports.uint = _valueExp(exp.ops.VAL_UINT, 'uintVal')
const _uint = exports.uint

@@ -898,3 +891,3 @@ /**

* for expressions on the List datatype.
*
*
* @summary List expressions.

@@ -907,6 +900,6 @@ */

* for expressions on the Map datatype.
*
*
* @summary Map expressions.
*/
exports.maps = require('./exp_maps')
exports.maps = require('./exp_maps')

@@ -916,6 +909,6 @@ /**

* for expressions on the Blob datatype
*
*
* @summary Blob expressions.
*/
exports.bit = require('./exp_bit')
exports.bit = require('./exp_bit')

@@ -925,5 +918,5 @@ /**

* for expressions on the HyperLogLog datatype
*
*
* @summary HyperLogLog expressions.
*/
exports.hll = require('./exp_hll')
exports.hll = require('./exp_hll')

@@ -47,3 +47,3 @@ // *****************************************************************************

* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),
*
*
* }

@@ -50,0 +50,0 @@ * }

@@ -37,3 +37,3 @@ // *****************************************************************************

* const key = new Aerospike.Key('test', 'demo', 'hllDemo')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -40,0 +40,0 @@ * var config = {

@@ -35,3 +35,3 @@ // *****************************************************************************

* const Aerospike = require('aerospike')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -44,3 +44,3 @@ * var config = {

* }
*
*
* let binName = 'food'

@@ -47,0 +47,0 @@ * let indexName = 'foodIndex'

@@ -35,3 +35,3 @@ // *****************************************************************************

* const Aerospike = require('aerospike')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -241,4 +241,4 @@ * var config = {

/** Returns a new string with the last character removed
* @private
/** Returns a new string with the last character removed
* @private
* */

@@ -245,0 +245,0 @@ function chop (str) {

@@ -105,3 +105,3 @@ // *****************************************************************************

* const Aerospike = require('aerospike')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -108,0 +108,0 @@ * var config = {

@@ -404,3 +404,3 @@ // *****************************************************************************

* // Timeouts disabled, latency dependent on server location. Configure as needed.
* policies: {
* policies: {
* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),

@@ -460,3 +460,3 @@ * operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})

* }
*
*
* var ops = [

@@ -563,3 +563,3 @@ * lists.insert('tags', 2, 'orange'),

* ]
*
*
* Aerospike.client(config).connect((error, client) => {

@@ -957,3 +957,3 @@ * if (error) throw error

* policies: {
* read : new Aerospike.ReadPolicy({socketTimeout : 0, totalTimeout : 0}),
* read : new Aerospike.ReadPolicy({socketTimeout : 0, totalTimeout : 0}),
* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),

@@ -1106,3 +1106,3 @@ * operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})

* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout: 0})
*
*
* }

@@ -1154,3 +1154,3 @@ * }

* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),
* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})
* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})
* }

@@ -1202,3 +1202,3 @@ * }

* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),
* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})
* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})
* }

@@ -1218,3 +1218,3 @@ * }

* client.close()
*
*
* })

@@ -1264,3 +1264,3 @@ * })

* client.close()
*
*
* })

@@ -1594,3 +1594,3 @@ * })

* ]
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -1606,3 +1606,3 @@ * var config = {

* }
*
*
* Aerospike.client(config).connect((error, client) => {

@@ -1609,0 +1609,0 @@ * if (error) throw error

@@ -94,3 +94,3 @@ // *****************************************************************************

* }
*
*
* Aerospike.connect(config).then(async client => {

@@ -143,3 +143,3 @@ * let ops = [

* const key = new Aerospike.Key('test', 'demo', 'mapKey')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -191,3 +191,3 @@ * var config = {

* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),
* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})
* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})
* }

@@ -986,3 +986,3 @@ * }

* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),
* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})
* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})
* }

@@ -1108,3 +1108,3 @@ * }

* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0})
*
*
* }

@@ -1111,0 +1111,0 @@ * }

@@ -38,3 +38,3 @@ // *****************************************************************************

* operate : new Aerospike.OperatePolicy({socketTimeout : 0, totalTimeout : 0}),
* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),
* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),
* }

@@ -63,16 +63,15 @@ * }

/**
* @class aerospike/operations~Operation
* @protected
* @classdesc Base class for all operations executed with the {@link
* Client#operate} command.
*
* Operations can be created using the methods in one of the following modules:
* * {@link module:aerospike/operations} - General operations on all types.
* * {@link module:aerospike/lists} - Operations on CDT List values.
* * {@link module:aerospike/maps} - Operations on CDT Map values.
* * {@link module:aerospike/bitwise} - Operations on Bytes values.
*
*/
* @class aerospike/operations~Operation
* @protected
* @classdesc Base class for all operations executed with the {@link
* Client#operate} command.
*
* Operations can be created using the methods in one of the following modules:
* * {@link module:aerospike/operations} - General operations on all types.
* * {@link module:aerospike/lists} - Operations on CDT List values.
* * {@link module:aerospike/maps} - Operations on CDT Map values.
* * {@link module:aerospike/bitwise} - Operations on Bytes values.
*
*/
class Operation {
constructor (op, bin, props) {

@@ -79,0 +78,0 @@ this.op = op

@@ -104,3 +104,3 @@ // *****************************************************************************

* const config = {
* hosts: '192.168.33.10:3000'
* hosts: '192.168.33.10:3000'
* }

@@ -161,3 +161,3 @@ *

* policies: {
* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0})
* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0})
* }

@@ -295,3 +295,3 @@ * }

/**
* A base class extended to client policies.
* A base class extended to client policies.
*

@@ -298,0 +298,0 @@ * @summary {@link BasePolicy} class

@@ -43,3 +43,3 @@ // *****************************************************************************

* const Aerospike = require('aerospike')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -53,3 +53,3 @@ * var config = {

* }
*
*
* Aerospike.connect(config, (error, client) => {

@@ -56,0 +56,0 @@ * if (error) throw error

@@ -28,3 +28,3 @@ // *****************************************************************************

* record is uniquely identified by it's key within a given namespace.
*
*
* @summary Construct a new Aerospike Record instance.

@@ -35,3 +35,3 @@ *

* const Aerospike = require('aerospike')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -45,3 +45,3 @@ * var config = {

* }
*
*
* let bins = {

@@ -68,3 +68,3 @@ * int: 123,

* client.close()
* })
* })
* .catch(error => {

@@ -96,3 +96,3 @@ * console.log(record)

* }
*
*
* let key = new Aerospike.Key('test', 'demo', 'myKey')

@@ -115,3 +115,3 @@ *

* return Promise.reject(error)
* })
* })
* })

@@ -122,3 +122,3 @@ * .catch(error => {

* })
* })
* })
* .catch(error => console.error('Error:', error))

@@ -140,6 +140,6 @@ *

* batch : new Aerospike.BatchPolicy({socketTimeout : 0, totalTimeout : 0})
*
*
* }
* }
*
*
* var batchRecords = [

@@ -162,7 +162,7 @@ * { type: Aerospike.batchType.BATCH_READ,

* console.log(result)
*
*
* })
* client.close()
* })
*
*
* })

@@ -175,3 +175,3 @@ *

* const Aerospike = require('aerospike')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -184,6 +184,6 @@ * var config = {

* write : new Aerospike.WritePolicy({socketTimeout : 0, totalTimeout : 0}),
*
*
* }
* }
*
*
* const batchType = Aerospike.batchType

@@ -190,0 +190,0 @@ * var batchRecords = [

@@ -91,3 +91,3 @@ // *****************************************************************************

* }
*
*
* Aerospike.connect(config, (error, client) => {

@@ -272,3 +272,3 @@ * if (error) throw error

* const Aerospike = require('aerospike')
*
*
* // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE!

@@ -282,3 +282,3 @@ * var config = {

* }
*
*
* Aerospike.connect(config).then(async (client) => {

@@ -285,0 +285,0 @@ * const scan = client.scan('namespace', 'set')

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

/**

@@ -253,4 +252,2 @@ * @typedef {Object} Policies

/**

@@ -257,0 +254,0 @@ * @typedef {object} RecordObject

{
"name": "aerospike",
"version": "5.1.0",
"version": "5.1.1",
"description": "Aerospike Client Library",

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

"type": "git",
"url": "https://github.com/aerospike/aerospike-client-nodejs"
"url": "git+https://github.com/aerospike/aerospike-client-nodejs.git"
},

@@ -56,3 +56,3 @@ "bugs": {

"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.9",
"@mapbox/node-pre-gyp": "^1.0.10",
"bindings": "^1.3.0",

@@ -98,3 +98,10 @@ "minimatch": "^3.0.4",

"typings/"
]
],
"directories": {
"doc": "docs",
"example": "examples",
"lib": "lib",
"test": "test"
},
"author": ""
}

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

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