Socket
Socket
Sign inDemoInstall

aerospike

Package Overview
Dependencies
Maintainers
4
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 4.0.4 to 4.0.5

61

lib/aerospike.js

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

const EventLoop = require('./event_loop')
const utils = require('./utils')

@@ -67,3 +66,2 @@ /**

*
* @readonly
* @enum {number}

@@ -171,17 +169,18 @@ *

*/
const policy = exports.policy = require('./policy')
exports.policy = require('./policy')
// short-cuts to the policy classes defined under the policy module
exports.ApplyPolicy = policy.ApplyPolicy
exports.BatchPolicy = policy.BatchPolicy
exports.CommandQueuePolicy = policy.CommandQueuePolicy
exports.InfoPolicy = policy.InfoPolicy
exports.ListPolicy = policy.ListPolicy
exports.MapPolicy = policy.MapPolicy
exports.OperatePolicy = policy.OperatePolicy
exports.QueryPolicy = policy.QueryPolicy
exports.ReadPolicy = policy.ReadPolicy
exports.RemovePolicy = policy.RemovePolicy
exports.ScanPolicy = policy.ScanPolicy
exports.WritePolicy = policy.WritePolicy
exports.BasePolicy = require('./policy').BasePolicy
exports.ApplyPolicy = require('./policy').ApplyPolicy
exports.BatchPolicy = require('./policy').BatchPolicy
exports.OperatePolicy = require('./policy').OperatePolicy
exports.QueryPolicy = require('./policy').QueryPolicy
exports.ReadPolicy = require('./policy').ReadPolicy
exports.RemovePolicy = require('./policy').RemovePolicy
exports.ScanPolicy = require('./policy').ScanPolicy
exports.WritePolicy = require('./policy').WritePolicy
exports.CommandQueuePolicy = require('./policy').CommandQueuePolicy
exports.InfoPolicy = require('./policy').InfoPolicy
exports.ListPolicy = require('./policy').ListPolicy
exports.MapPolicy = require('./policy').MapPolicy

@@ -283,3 +282,2 @@ /**

*
* @readonly
* @enum {number}

@@ -299,2 +297,5 @@ *

* authentication.
* @property {number} AUTH_PKI - Use PKI authentication.
* Authentication and authorization is based on a certificate. No user name or
* password needs to be configured. Requires mTLS and a client certificate.
*

@@ -311,2 +312,20 @@ * @example <caption>Using external authentication mode, e.g. to use LDAP authentication</caption>

*
*
* @example <caption>Using PKI authentication mode</caption>
*
* const Aerospike = require('aerospike')
*
* const config = {
* hosts: [
* { addr: 'bob-cluster-a', port: process.env.PORT}
* ],
* tls: {
* cafile: process.env.CAFILE,
* keyfile: process.env.KEYFILE,
* certfile: process.env.CERT,
* }
* authMode: Aerospike.auth.AUTH_PKI,
* }
*
*
* Aerospike.connect(config).then(async (client) => {

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

*
* @readonly
* @enum {number}

@@ -334,3 +352,2 @@ *

*
* @readonly
* @enum {number}

@@ -375,3 +392,2 @@ *

*
* @readonly
* @enum {number}

@@ -421,3 +437,2 @@ *

*
* @readonly
* @enum {number}

@@ -437,3 +452,2 @@ *

*
* @readonly
* @enum {number}

@@ -452,3 +466,2 @@ *

*
* @readonly
* @enum {number}

@@ -476,4 +489,4 @@ *

exports.print = utils.print
exports.releaseEventLoop = EventLoop.releaseEventLoop
exports.print = require('./utils').print
exports.releaseEventLoop = require('./event_loop').releaseEventLoop

@@ -480,0 +493,0 @@ const Client = exports.Client

@@ -159,3 +159,3 @@ // *****************************************************************************

* @param {number} offset - Offset in bytes.
* @param {buffer} value - Bytes to insert.
* @param {Buffer} value - Bytes to insert.
* @returns {BitwiseOperation} Operation that can be passed to the {@link Client#operate} command.

@@ -194,3 +194,3 @@ */

* @param {number} bitSize - Number of bits to set.
* @param {number | buffer} value - Value to set.
* @param {number | Buffer} value - Value to set.
* @returns {BitwiseOperation} Operation that can be passed to the {@link Client#operate} command.

@@ -225,3 +225,3 @@ *

* @param {number} bitSize - Number of bits.
* @param {buffer} value - Value.
* @param {Buffer} value - Value.
* @returns {BitwiseOperation} Operation that can be passed to the {@link Client#operate} command.

@@ -245,3 +245,3 @@ */

* @param {number} bitSize - Number of bits.
* @param {buffer} value - Value.
* @param {Buffer} value - Value.
* @returns {BitwiseOperation} Operation that can be passed to the {@link Client#operate} command.

@@ -265,3 +265,3 @@ */

* @param {number} bitSize - Number of bits.
* @param {buffer} value - Value.
* @param {Buffer} value - Value.
* @returns {BitwiseOperation} Operation that can be passed to the {@link Client#operate} command.

@@ -268,0 +268,0 @@ */

@@ -160,4 +160,4 @@ // *****************************************************************************

* @param {CdtContext} ctx, ctx value object.
* @param {exp.type} type, default expression type.
* @return {exp.type} expression type.
* @param {number} type, {@link exp.type} default expression type.
* @return {number} {@link exp.type} expression type.
*/

@@ -164,0 +164,0 @@ static getContextType (/* CdtContext */ctx, type) {

@@ -349,6 +349,7 @@ // *****************************************************************************

*
* @param {object[]} records - List of keys and bins to retrieve.
* @param {Key} records[].key - Key to retrieve.
* @param {object[]} records - {@link Record} List of keys and bins to retrieve.
* @param {number} records[].type - {@link Record#type} Batch type.
* @param {Key} records[].key - Record Key.
* @param {string[]} [records[].bins] - List of bins to retrieve.
* @param {boolean} [records[].read_all_bins] - Whether to retrieve all bins or
* @param {boolean} [records[].readAllBins] - Whether to retrieve all bins or
* just the meta data of the record. If true, ignore <code>bins</code> and read

@@ -1350,3 +1351,3 @@ * all bins; if false and <code>bins</code> is specified, read specified bins;

* @param {WritePolicy} [policy] - The Write Policy to use for this operation.
* @param {writeCallback} callback - The function to call when the operation completes with the result of the operation.
* @param {writeCallback} [callback] - The function to call when the operation completes with the result of the operation.
*

@@ -1421,3 +1422,3 @@ * @example

* @param {RemovePolicy} [policy] - The Remove Policy to use for this operation.
* @param {writeCallback} callback - The function to call when the operation completes with the results of the operation.
* @param {writeCallback} [callback] - The function to call when the operation completes with the results of the operation.
*

@@ -1519,3 +1520,3 @@ * @example

* @param {InfoPolicy} [policy] - The Info Policy to use for this operation.
* @param {doneCallback} callback - The function to call when the
* @param {doneCallback} [callback] - The function to call when the
* operation completes with the result of the operation.

@@ -1563,3 +1564,3 @@ *

* @param {InfoPolicy} [policy] - The Info Policy to use for this operation.
* @param {jobCallback} callback - The function to call when the
* @param {jobCallback} [callback] - The function to call when the
* operation completes with the result of the operation.

@@ -1656,3 +1657,3 @@ *

* @param {InfoPolicy} [policy] - The Info Policy to use for this operation.
* @param {jobCallback} callback - The function to call when the
* @param {jobCallback} [callback] - The function to call when the
* operation completes which the result of the operation.

@@ -1659,0 +1660,0 @@ *

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

* @classdesc Database command.
* @type Class
*/

@@ -43,3 +44,2 @@ module.exports = asCommand => class Command {

* @type {Client}
* @readonly
*/

@@ -61,3 +61,2 @@ this.client = client

* @type {boolean}
* @readonly
* @see {@link Client#captureStackTraces}

@@ -72,3 +71,2 @@ */

* @type {?Key}
* @readonly
*/

@@ -75,0 +73,0 @@ this.key = undefined

@@ -24,2 +24,4 @@ // *****************************************************************************

/**
* @class Config
* @classdesc config command.
* The Config class contains the settings for an Aerospike client

@@ -29,2 +31,3 @@ * instance, including the list of seed hosts, default policies, and other

*
* @type Class
* @throws {TypeError} If invalid config values are passed.

@@ -255,3 +258,3 @@ *

*
* @type {Config~Policies}
* @type {Policies}
*

@@ -550,3 +553,3 @@ * @example <caption>Setting a default <code>key</code> policy for all write operations</caption>

*
* @param {Config~Policies} one or more default policies
* @param {Policies} one or more default policies
* @throws {TypeError} if any of the properties of the policies object is not

@@ -577,16 +580,2 @@ * a valid policy type

/**
* @typedef {Object} Config~Policies
*
* @property {ApplyPolicy} apply - Default apply policy
* @property {BatchPolicy} batch - Default batch policy
* @property {InfoPolicy} info - Default info policy
* @property {OperatePolicy} operate - Default operate policy
* @property {ReadPolicy} read - Default read policy
* @property {RemovePolicy} remove - Default remove policy
* @property {ScanPolicy} scan - Default scan policy
* @property {QueryPolicy} query - Default query policy
* @property {WritePolicy} write - Default write policy
*/
module.exports = Config

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

* @type {number}
* @readonly
*

@@ -60,4 +59,3 @@ * @see {@link module:aerospike.status} contains the full list of possible status codes.

*
* @type {?Command}
* @readonly
* @type {?Object}
*/

@@ -70,3 +68,2 @@ this.command = command || null

* @type {?string}
* @readonly
*/

@@ -79,3 +76,2 @@ this.func = null

* @type {?string}
* @readonly
*/

@@ -88,3 +84,2 @@ this.file = null

* @type {?number}
* @readonly
*/

@@ -99,3 +94,2 @@ this.line = null

* @type {boolean}
* @readonly
*/

@@ -162,3 +156,2 @@ this.inDoubt = false

* @type {?Client}
* @readonly
* @since v3.7.0

@@ -165,0 +158,0 @@ *

@@ -63,3 +63,3 @@ // *****************************************************************************

/**
* @class module:aerospike/expoperations~ExpOperation
* @class module:aerospike/exp_operations~ExpOperation
*

@@ -66,0 +66,0 @@ * @classdesc class for all expression operations executed with the {@link

@@ -156,3 +156,3 @@ // *****************************************************************************

* @param {string} bin - The name of the bin.
* @param {(string|integer)} value - The value that should be a member of the
* @param {(string|number)} value - The value that should be a member of the
* list or map in the bin.

@@ -159,0 +159,0 @@ * @param {number} indexType - One of {@link module:aerospike.indexType},

@@ -97,3 +97,3 @@ // *****************************************************************************

* @param {Client~InfoPolicy} [policy] - The Info Policy to use for this operation.
* @param {Job~infoCallback} [callback] - The function to call with the job info response.
* @param {JobinfoCallback} [callback] - The function to call with the job info response.
*

@@ -143,3 +143,3 @@ * @return {?Promise} If no callback function is passed, the function returns a

* @param {number} [pollInterval=1000] - Interval in milliseconds to use when polling the cluster nodes.
* @param {Job~doneCallback} [callback] - The function to call when the task has completed.
* @param {JobdoneCallback} [callback] - The function to call when the task has completed.
*

@@ -167,22 +167,2 @@ * @return {?Promise} If no callback function is passed, the function returns a

/**
* @callback Job~doneCallback
*
* @summary Callback function called when a job has completed.
*
* @param {?AerospikeError} error - The error code and message or <code>null</code> if the operation was successful.
*/
/**
* @callback Job~infoCallback
*
* @summary The function called with the job info response.
*
* @param {?AerospikeError} error - The error code and message or <code>null</code> if the operation was successful.
* @param {object} [info] - The job info.
* @param {number} [info.status] - Status of the job. See {@link module:aerospike.jobStatus}.
* @param {number} [info.progressPct] - Progress estimate for the job, as percentage.
* @param {number} [info.recordsRead] - How many records have been processed.
*/
module.exports = Job

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

* strings, integers or an instance of the Buffer class.
* @param {string} [digest] - The digest value of the key.
*

@@ -43,0 +44,0 @@ * @example <caption>Creating a new {@link Key} instance</caption>

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

const opcodes = as.mapOperations
const policy = require('./policy')
const Context = require('./cdt_context')

@@ -303,7 +302,2 @@ const Operation = require('./operations').Operation

/**
* @private
*/
exports.MapPolicy = policy.MapPolicy
/**
* @summary Sets map policy attributes.

@@ -310,0 +304,0 @@ *

@@ -111,3 +111,3 @@ // *****************************************************************************

* @param {string} bin - The name of the bin.
* @param {(number|Double)} value - The value to increment the bin by.
* @param {(number|Object)} value - The number|{@link Double} value to increment the bin by.
* @returns {Operation} Operation that can be passed to the {@link Client#operate} command.

@@ -114,0 +114,0 @@ */

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

* retry handling.
* Applies to {@link ApplyPolicy}, {@link BatchPolicy}, {@link OperatePolicy},
* {@link QueryPolicy}, {@link ReadPolicy}, {@link RemovePolicy}, {@link ScanPolicy} and {@link WritePolicy}.
*

@@ -28,5 +30,2 @@ * @since v3.0.0

class BasePolicy {
/**
* @private
*/
constructor (props) {

@@ -92,19 +91,2 @@ props = props || {}

/**
* Use zlib compression on write or batch read commands when the command
* buffer size is greater than 128 bytes. In addition, tell the server to
* compress it's response on read commands. The server response compression
* threshold is also 128 bytes.
*
* This option will increase cpu and memory usage (for extra compressed
* buffers), but decrease the size of data sent over the network.
*
* Requires Enterprise Server version >= 4.8.
*
* @type boolean
* @default: false
* @since v3.14.0
*/
this.compress = props.compress
/**
* Optional predicate expression filter list in postfix notation. If the

@@ -128,3 +110,3 @@ * predicate expression exists and evaluates to false on the server, the

*
* @type Predicate[]
* @type object[]
* @since v3.14.0

@@ -156,2 +138,19 @@ */

this.filterExpression = props.filterExpression
/**
* Use zlib compression on write or batch read commands when the command
* buffer size is greater than 128 bytes. In addition, tell the server to
* compress it's response on read commands. The server response compression
* threshold is also 128 bytes.
*
* This option will increase cpu and memory usage (for extra compressed
* buffers), but decrease the size of data sent over the network.
*
* Requires Enterprise Server version >= 4.8.
*
* @type boolean
* @default: false
* @since v3.14.0
*/
this.compress = props.compress
}

@@ -158,0 +157,0 @@ }

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

const BasePolicy = require('./policies/base_policy')
const ApplyPolicy = require('./policies/apply_policy')
const BatchPolicy = require('./policies/batch_policy')
const CommandQueuePolicy = require('./policies/command_queue_policy')
const InfoPolicy = require('./policies/info_policy')
const ListPolicy = require('./policies/list_policy')
const MapPolicy = require('./policies/map_policy')
const OperatePolicy = require('./policies/operate_policy')

@@ -34,3 +30,9 @@ const QueryPolicy = require('./policies/query_policy')

const WritePolicy = require('./policies/write_policy')
const BatchPolicy = require('./policies/batch_policy')
const CommandQueuePolicy = require('./policies/command_queue_policy')
const HLLPolicy = require('./policies/hll_policy')
const InfoPolicy = require('./policies/info_policy')
const ListPolicy = require('./policies/list_policy')
const MapPolicy = require('./policies/map_policy')
/**

@@ -50,5 +52,14 @@ * @module aerospike/policy

* * {@link ApplyPolicy} - Applies to {@link Client#apply}.
* * {@link OperatePolicy} - Applies to {@link Client#operate} as well as {@link Client#append}, {@link Client#prepend} and {@link Client#add}.
* * {@link QueryPolicy} - Applies to {@link Query#apply}, {@link Query#background} and {@link Query#foreach}.
* * {@link ReadPolicy} - Applies to {@link Client#exists}, {@link Client#get} and {@link Client#select}.
* * {@link RemovePolicy} - Applies to {@link Client#remove}.
* * {@link ScanPolicy} - Applies to {@link Scan#background} and {@link Scan#foreach}.
* * {@link WritePolicy} - Applies to {@link Client#put}.
* * {@link BatchPolicy} - Applies to {@link Client#batchRead} as well as the
* deprecated {@link Client#batchExists}, {@link Client#batchGet}, and {@link
* Client#batchSelect} operations.
* * {@link CommandQueuePolicy} - Applies to global command queue {@link module:aerospike.setupGlobalCommandQueue
* Aerospike.setupGlobalCommandQueue}
* * {@link HLLPolicy} - Applies to {@link module:aerospike/hll|HLL} operations
* * {@link InfoPolicy} - Applies to {@link Client#info}, {@link

@@ -60,12 +71,6 @@ * Client#infoAny}, {@link Client#infoAll} as well as {@link

* * {@link MapPolicy} - Applies to Map operations defined in {@link module:aerospike/maps}.
* * {@link OperatePolicy} - Applies to {@link Client#operate} as well as {@link Client#append}, {@link Client#prepend} and {@link Client#add}.
* * {@link QueryPolicy} - Applies to {@link Query#apply}, {@link Query#background} and {@link Query#foreach}.
* * {@link ReadPolicy} - Applies to {@link Client#exists}, {@link Client#get} and {@link Client#select}.
* * {@link RemovePolicy} - Applies to {@link Client#remove}.
* * {@link ScanPolicy} - Applies to {@link Scan#background} and {@link Scan#foreach}.
* * {@link WritePolicy} - Applies to {@link Client#put}.
*
* All client policy classes are derives from the common {@link BasePolicy}
* class which defines common policy values that apply to all database
* operations (except `InfoPolicy`, `MapPolicy` and `ListPolicy`).
* Base policy {@link BasePolicy} class which defines common policy
* values that apply to all database operations
* (except `InfoPolicy`, `MapPolicy` and `ListPolicy`).
*

@@ -283,2 +288,9 @@ * This module also defines global values for the following policy settings:

/**
* A policy affecting the behavior of most operations.
*
* @summary {@link BasePolicy} class
*/
exports.BasePolicy = BasePolicy
/**
* A policy affecting the behavior of apply operations.

@@ -291,83 +303,90 @@ *

/**
* A policy affecting the behavior of batch operations.
* A policy affecting the behavior of operate operations.
*
* @summary {@link BatchPolicy} class
* @summary {@link OperatePolicy} class
*/
exports.BatchPolicy = BatchPolicy
exports.OperatePolicy = OperatePolicy
/**
* A policy affecting the use of the global command queue.
* A policy affecting the behavior of query operations.
*
* @summary {@link CommandQueuePolicy} class
* @summary {@link QueryPolicy} class
*/
exports.CommandQueuePolicy = CommandQueuePolicy
exports.QueryPolicy = QueryPolicy
/**
* A policy affecting the behavior of info operations.
* A policy affecting the behavior of read operations.
*
* @summary {@link InfoPolicy} class
* @summary {@link ReadPolicy} class
*/
exports.InfoPolicy = InfoPolicy
exports.ReadPolicy = ReadPolicy
/**
* A policy affecting the behavior of list operations.
* A policy affecting the behavior of remove operations.
*
* @summary {@link ListPolicy} class
* @summary {@link RemovePolicy} class
*/
exports.ListPolicy = ListPolicy
exports.RemovePolicy = RemovePolicy
/**
* A policy affecting the behavior of map operations.
* A policy affecting the behavior of scan operations.
*
* @summary {@link MapPolicy} class
* @summary {@link ScanPolicy} class
*/
exports.MapPolicy = MapPolicy
exports.ScanPolicy = ScanPolicy
/**
* A policy affecting the behavior of operate operations.
* A policy affecting the behavior of write operations.
*
* @summary {@link OperatePolicy} class
* @summary {@link WritePolicy} class
*/
exports.OperatePolicy = OperatePolicy
exports.WritePolicy = WritePolicy
/**
* A policy affecting the behavior of query operations.
* A policy affecting the behavior of batch operations.
*
* @summary {@link QueryPolicy} class
* @summary {@link BatchPolicy} class
*/
exports.QueryPolicy = QueryPolicy
exports.BatchPolicy = BatchPolicy
/**
* A policy affecting the behavior of read operations.
* A policy affecting the use of the global command queue.
*
* @summary {@link ReadPolicy} class
* @summary {@link CommandQueuePolicy} class
*/
exports.ReadPolicy = ReadPolicy
exports.CommandQueuePolicy = CommandQueuePolicy
/**
* A policy affecting the behavior of remove operations.
* A policy affecting the behavior of HLL operations.
*
* @summary {@link RemovePolicy} class
* @summary {@link HLLPolicy} class
*/
exports.RemovePolicy = RemovePolicy
exports.HLLPolicy = HLLPolicy
/**
* A policy affecting the behavior of scan operations.
* A policy affecting the behavior of info operations.
*
* @summary {@link ScanPolicy} class
* @summary {@link InfoPolicy} class
*/
exports.ScanPolicy = ScanPolicy
exports.InfoPolicy = InfoPolicy
/**
* A policy affecting the behavior of write operations.
* A policy affecting the behavior of list operations.
*
* @summary {@link WritePolicy} class
* @summary {@link ListPolicy} class
*/
exports.WritePolicy = WritePolicy
exports.ListPolicy = ListPolicy
/**
* A policy affecting the behavior of map operations.
*
* @summary {@link MapPolicy} class
*/
exports.MapPolicy = MapPolicy
function policyClass (type) {
switch (type) {
case 'base': return BasePolicy
case 'apply': return ApplyPolicy
case 'batch': return BatchPolicy
case 'info': return InfoPolicy
case 'operate': return OperatePolicy

@@ -379,2 +398,7 @@ case 'query': return QueryPolicy

case 'write': return WritePolicy
case 'commandQueue': return CommandQueuePolicy
case 'hll': return HLLPolicy
case 'info': return InfoPolicy
case 'list': return ListPolicy
case 'map': return MapPolicy
default:

@@ -381,0 +405,0 @@ throw new TypeError(`Unknown policy type: "${type}"`)

@@ -144,3 +144,3 @@ // *****************************************************************************

* @param {object} [options] - Query parameters.
* @param {FilterPredicate[]} [options.filters] - List of filter predicates to
* @param {object[]} [options.filters] - List of filter predicates to
* apply to the query. See {@link Query#where}.

@@ -222,3 +222,3 @@ * @param {string[]} [options.select] - List of bin names to select. See

*
* @member {FilterPredicate[]} Query#filters
* @member {object[]} Query#filters
*

@@ -234,3 +234,3 @@ * @see Use {@link Query#where} to add filter predicates to the query.

*
* @member {Predicate[]} Query#predexp
* @member {object[]} Query#predexp
*

@@ -414,2 +414,7 @@ * @see Use {@link Query#where} to add a predicate expression to the query.

* @param {QueryPolicy} [policy] - The Query Policy to use for this operation.
* @param {recordCallback} [dataCb] - The function to call when the
* operation completes with the results of the operation; if no callback
* function is provided, the method returns a <code>Promise<code> instead.
* @param {errorCallback} [errorCb] - Callback function called when there is an error.
* @param {doneCallback} [endCb] - Callback function called when an operation has completed.
*

@@ -449,3 +454,3 @@ * @returns {RecordStream}

*
* @returns {Promise<Record[]>}
* @returns {Promise<RecordObject[]>}
*/

@@ -473,3 +478,3 @@ Query.prototype.results = function (policy) {

* @param {QueryPolicy} [policy] - The Query Policy to use for this operation.
* @param {Query~aggregationResultCallback} [callback] - The function to call when the operation completes.
* @param {QueryaggregationResultCallback} [callback] - The function to call when the operation completes.
*

@@ -596,18 +601,2 @@ * @returns {?Promise} If no callback function is passed, the function returns

/**
* @callback Query~aggregationResultCallback
*
* @summary Callback function returning the aggregation result for a query.
*
* @description
*
* If the operation was successful, <code>null</code> will be returned for the
* error parameter. If there was an error, <code>result</code> will be
* <code>undefined</code> and the <code>error</code> paramter will provide more
* information about the error.
*
* @param {?AerospikeError} error - The error code and message or <code>null</code> if the operation was successful.
* @param {(number|string|Array<*>|Object)} [result] - The aggregation result.
*/
module.exports = Query

@@ -20,4 +20,9 @@ // *****************************************************************************

/**
* @class Record
* @classdesc Aerospike Record
*
* @summary Construct a new Aerospike Record instance.
*
* A record with the Aerospike database consists of one or more record "bins"
* (name-value pairs) and meta-data, incl. time-to-live and generation; a
* (name-value pairs) and meta-data, including time-to-live and generation; a
* record is uniquely identified by it's key within a given namespace.

@@ -24,0 +29,0 @@ *

@@ -253,2 +253,7 @@ // *****************************************************************************

* @param {ScanPolicy} [policy] - The Scan Policy to use for this operation.
* @param {recordCallback} [dataCb] - The function to call when the
* operation completes with the results of the operation; if no callback
* function is provided, the method returns a <code>Promise<code> instead.
* @param {errorCallback} [errorCb] - Callback function called when there is an error.
* @param {doneCallback} [endCb] - Callback function called when an operation has completed.
*

@@ -255,0 +260,0 @@ * @returns {RecordStream}

@@ -68,2 +68,10 @@ // *****************************************************************************

/**
* @callback errorCallback
*
* @summary Callback function called when an error occured.
*
* @param {?AerospikeError} error - The error code and message or <code>null</code>.
*/
/**
* @callback recordCallback

@@ -177,2 +185,38 @@ *

/**
* @callback JobdoneCallback
*
* @summary Callback function called when a job has completed.
*
* @param {?AerospikeError} error - The error code and message or <code>null</code> if the operation was successful.
*/
/**
* @callback JobinfoCallback
*
* @summary The function called with the job info response.
*
* @param {?AerospikeError} error - The error code and message or <code>null</code> if the operation was successful.
* @param {object} [info] - The job info.
* @param {number} [info.status] - Status of the job. See {@link module:aerospike.jobStatus}.
* @param {number} [info.progressPct] - Progress estimate for the job, as percentage.
* @param {number} [info.recordsRead] - How many records have been processed.
*/
/**
* @callback QueryaggregationResultCallback
*
* @summary Callback function returning the aggregation result for a query.
*
* @description
*
* If the operation was successful, <code>null</code> will be returned for the
* error parameter. If there was an error, <code>result</code> will be
* <code>undefined</code> and the <code>error</code> paramter will provide more
* information about the error.
*
* @param {?AerospikeError} error - The error code and message or <code>null</code> if the operation was successful.
* @param {(number|string|Array<*>|Object)} [result] - The aggregation result.
*/
/**
* @typedef {object} AerospikeExp

@@ -184,1 +228,61 @@ *

*/
/**
* @typedef {object} ApplyPolicy
* @typedef {object} BatchPolicy
* @typedef {object} InfoPolicy
* @typedef {object} OperatePolicy
* @typedef {object} ReadPolicy
* @typedef {object} RemovePolicy
* @typedef {object} ScanPolicy
* @typedef {object} QueryPolicy
* @typedef {object} WritePolicy
* @typedef {object} BitwisePolicy
* @typedef {object} MapPolicy
* @typedef {object} CommandQueuePolicy
*
* @summary Aerospike Policy objects
*
*/
/**
* @typedef {Object} Policies
*
* @property {ApplyPolicy} apply - Default apply policy
* @property {BatchPolicy} batch - Default batch policy
* @property {InfoPolicy} info - Default info policy
* @property {OperatePolicy} operate - Default operate policy
* @property {ReadPolicy} read - Default read policy
* @property {RemovePolicy} remove - Default remove policy
* @property {ScanPolicy} scan - Default scan policy
* @property {QueryPolicy} query - Default query policy
* @property {WritePolicy} write - Default write policy
*/
/**
* @typedef {object} Operation
*
* @summary Aerospike Operation object
*
*/
/**
* @typedef {object} Client
*
* @summary Aerospike Client object
*
*/
/**
* @typedef {object} Key
*
* @summary Aerospike Key object
*
*/
/**
* @typedef {object} RecordObject
*
* @summary Aerospike Record object
*
*/
{
"name": "aerospike",
"version": "4.0.4",
"version": "4.0.5",
"description": "Aerospike Client Library",

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

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

const orderMap = (bin, order, ctx) => {
const policy = new maps.MapPolicy({ order })
const policy = new Aerospike.MapPolicy({ order })
const setMapPolicy = maps.setPolicy(bin, policy)

@@ -104,3 +104,3 @@ if (ctx) setMapPolicy.withContext(ctx)

context('update-only write mode', function () {
const updateOnlyPolicy = new maps.MapPolicy({
const updateOnlyPolicy = new Aerospike.MapPolicy({
writeMode: maps.writeMode.UPDATE_ONLY

@@ -131,3 +131,3 @@ })

const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.UPDATE_ONLY

@@ -155,3 +155,3 @@ })

context('with no-fail flag', function () {
const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.UPDATE_ONLY | maps.writeFlags.NO_FAIL

@@ -172,3 +172,3 @@ })

context('create-only write mode', function () {
const createOnlyPolicy = new maps.MapPolicy({
const createOnlyPolicy = new Aerospike.MapPolicy({
writeMode: maps.writeMode.CREATE_ONLY

@@ -199,3 +199,3 @@ })

const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.CREATE_ONLY

@@ -223,3 +223,3 @@ })

context('with no-fail flag', function () {
const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.CREATE_ONLY | maps.writeFlags.NO_FAIL

@@ -266,3 +266,3 @@ })

const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.UPDATE_ONLY

@@ -281,3 +281,3 @@ })

context('with no-fail flag', function () {
const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.UPDATE_ONLY | maps.writeFlags.NO_FAIL

@@ -296,3 +296,3 @@ })

context('with partial flag', function () {
const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.UPDATE_ONLY | maps.writeFlags.NO_FAIL | maps.writeFlags.PARTIAL

@@ -316,3 +316,3 @@ })

const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.CREATE_ONLY

@@ -331,3 +331,3 @@ })

context('with no-fail flag', function () {
const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.CREATE_ONLY | maps.writeFlags.NO_FAIL

@@ -346,3 +346,3 @@ })

context('with partial flag', function () {
const policy = new maps.MapPolicy({
const policy = new Aerospike.MapPolicy({
writeFlags: maps.writeFlags.CREATE_ONLY | maps.writeFlags.NO_FAIL | maps.writeFlags.PARTIAL

@@ -349,0 +349,0 @@ })

@@ -148,4 +148,4 @@ // *****************************************************************************

const policy = new Aerospike.ScanPolicy({
totalTimeout: 1000,
socketTimeout: 1000,
totalTimeout: 10000,
socketTimeout: 10000,
durableDelete: true,

@@ -152,0 +152,0 @@ recordsPerSecond: 50,

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 too big to display

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