diff --git a/.github/workflows/dev-build-node-cpp-addons.yml b/.github/workflows/dev-build-node-cpp-addons.yml index 9360662a3..28b54c1c8 100644 --- a/.github/workflows/dev-build-node-cpp-addons.yml +++ b/.github/workflows/dev-build-node-cpp-addons.yml @@ -46,7 +46,7 @@ jobs: platform-tag: [ "manylinux_x86_64", "manylinux_aarch64", - #"macosx_x86_64", + "macosx_x86_64", #"macosx_arm64", "win_amd64" ] diff --git a/.github/workflows/docker-build-context/Dockerfile b/.github/workflows/docker-build-context/Dockerfile index 231ea037f..40f0969a4 100644 --- a/.github/workflows/docker-build-context/Dockerfile +++ b/.github/workflows/docker-build-context/Dockerfile @@ -1,4 +1,4 @@ -ARG server_image=aerospike/aerospike-server-enterprise:8.1.0.0-rc5 +ARG server_image=aerospike/aerospike-server-enterprise:8.1.0.1 ARG ROSTER_FILE_NAME=roster.smd # Temp file for passing node id from one build stage to another # Docker doesn't support command substitution for setting values for ARG variables, so we have to do this @@ -22,10 +22,13 @@ RUN echo -e "security {\n\tenable-quotas true\n}\n" >> $AEROSPIKE_CONF_TEMPLATE_ # TODO: generate this automatically, somehow. COPY security.smd . + # Enable strong consistency RUN sed -i "s/\(namespace.*{\)/\1\n\tstrong-consistency true/" $AEROSPIKE_CONF_TEMPLATE_PATH RUN sed -i "s/\(namespace.*{\)/\1\n\tstrong-consistency-allow-expunge true/" $AEROSPIKE_CONF_TEMPLATE_PATH RUN sed -i "s/\(namespace.*{\)/\1\n\tdefault-ttl 2592000/" $AEROSPIKE_CONF_TEMPLATE_PATH +RUN sed -i "s/\(namespace.*{\)/\1\n\tnsup-period 0/" $AEROSPIKE_CONF_TEMPLATE_PATH + ARG ROSTER_FILE_NAME COPY $ROSTER_FILE_NAME . diff --git a/scripts/basic_test.js b/scripts/basic_test.js index ff2a1fd27..0a59e447c 100644 --- a/scripts/basic_test.js +++ b/scripts/basic_test.js @@ -2,7 +2,7 @@ const Aerospike = require('aerospike') // INSERT HOSTNAME AND PORT NUMBER OF AEROSPIKE SERVER NODE HERE! const config = { - hosts: '127.0.0.1 :3000', + hosts: '127.0.0.1 :3000' } const key = new Aerospike.Key('test', 'demo', 'demo') @@ -15,15 +15,15 @@ Aerospike.connect(config) b: Buffer.from('world'), d: new Aerospike.Double(3.1415), g: Aerospike.GeoJSON.Point(103.913, 1.308), - l: [1, 'a', {x: 'y'}], - m: {foo: 4, bar: 7} + l: [1, 'a', { x: 'y' }], + m: { foo: 4, bar: 7 } } const meta = { ttl: 10000 } const policy = new Aerospike.WritePolicy({ exists: Aerospike.policy.exists.CREATE_OR_REPLACE, // Timeouts disabled, latency dependent on server location. Configure as needed. - socketTimeout : 0, - totalTimeout : 0 + socketTimeout: 0, + totalTimeout: 0 }) return client.put(key, bins, meta, policy) @@ -44,12 +44,12 @@ Aerospike.connect(config) }) .then(record => { console.log(record.bins) // => { i: 124, - // s: 'hello', - // b: , - // d: 3.1415, - // g: '{"type":"Point","coordinates":[103.913,1.308]}', - // l: [ 1, 'a', { x: 'y' }, 'z' ], - // m: { foo: 4 } } + // s: 'hello', + // b: , + // d: 3.1415, + // g: '{"type":"Point","coordinates":[103.913,1.308]}', + // l: [ 1, 'a', { x: 'y' }, 'z' ], + // m: { foo: 4 } } }) .then(() => client.close()) }) @@ -58,4 +58,4 @@ Aerospike.connect(config) if (error.client) { error.client.close() } - }) \ No newline at end of file + }) diff --git a/ts-test/tests/enterprise.ts b/ts-test/tests/enterprise.ts index 933ad99e9..27b48c245 100644 --- a/ts-test/tests/enterprise.ts +++ b/ts-test/tests/enterprise.ts @@ -18,7 +18,7 @@ /* global expect, it, context */ /* eslint-disable no-unused-expressions */ -import Aerospike, { Client as Cli, WritePolicyOptions, RemovePolicyOptions, AerospikeRecord, AerospikeBins, Key } from 'aerospike'; +import Aerospike, { Client as Cli, WritePolicyOptions, RemovePolicyOptions, AerospikeRecord, AerospikeBins, Key, Query, exp, Job, operations} from 'aerospike'; import { expect } from 'chai'; import * as helper from './test_helper'; @@ -27,11 +27,19 @@ const keygen = helper.keygen.string(helper.namespace, helper.set, { prefix: 'tes const recgen = helper.recgen const valgen = helper.valgen +const op: typeof operations = Aerospike.operations + context('Enterprise server features', function () { helper.skipUnlessEnterprise(this) const client: Cli = helper.client + before(async () => { + + await helper.udf.register('udf.lua') + + }) + context('compression', function () { helper.skipUnlessVersion('>= 4.8.0', this) @@ -64,8 +72,42 @@ context('Enterprise server features', function () { await client.put(key, record) await client.remove(key, policy) + + expect(await client.exists(key)).to.be.false + + }) + + it('should apply the durable delete on query operate', async function () { + + const key: Key = keygen() + const record: AerospikeBins = recgen.record({ string: valgen.string() })() + await client.put(key, record) + + const query: Query = client.query(helper.namespace, helper.set) + const ops = [op.delete()] + const policy: WritePolicyOptions = { durableDelete: true } + const job = await query.operate(ops, policy) + await job.waitUntilDone() expect(await client.exists(key)).to.be.false }) + + it('should apply the durable delete policy on background query', async function () { + + const key: Key = keygen() + const record: AerospikeBins = recgen.record({ string: valgen.string() })() + await client.put(key, record) + + const query: Query = client.query(helper.namespace, helper.set) + const policy: WritePolicyOptions = { durableDelete: true } + + const job: Job = await query.background('udf', 'deleteRecord', null, policy) + expect(job).to.be.instanceof(Job) + await job.waitUntilDone() + + expect(await client.exists(key)).to.be.false + + }) + }) }) diff --git a/ts-test/tests/udf.lua b/ts-test/tests/udf.lua index e28a504ed..9cf8681ba 100644 --- a/ts-test/tests/udf.lua +++ b/ts-test/tests/udf.lua @@ -59,3 +59,8 @@ function even(stream, bin) end return stream : filter(filt) : map(mapper) end + +function deleteRecord(rec) + aerospike:remove(rec) + return 0 +end diff --git a/typings/index.d.ts b/typings/index.d.ts index fdd5cd6f4..dc435bff2 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1492,7 +1492,7 @@ export class Query { * * @param operations - List of write * operations to perform on the matching records. - * @param policy - The Query Policy to use for this command. + * @param policy - The Write Policy to use for this command. * @param queryID - Job ID to use for the query; will be assigned * randomly if zero or undefined. * @@ -1513,7 +1513,7 @@ export class Query { * client.close() * }) */ - public operate(operations: operations.Operation[], policy?: policy.QueryPolicy | null, queryID?: number| null): Promise; + public operate(operations: operations.Operation[], policy?: policy.WritePolicy | null, queryID?: number| null): Promise; /** * @param operations - List of write * operations to perform on the matching records. @@ -1525,23 +1525,23 @@ export class Query { /** * @param operations - List of write * operations to perform on the matching records. - * @param policy - The Query Policy to use for this command. + * @param policy - The Write Policy to use for this command. * @param callback - The function to call when the command completes. * * @returns Promise that resolves to a Job instance. */ - public operate(operations: operations.Operation[], policy: policy.QueryPolicy | null, callback?: TypedCallback): void; + public operate(operations: operations.Operation[], policy: policy.WritePolicy | null, callback?: TypedCallback): void; /** * @param operations - List of write * operations to perform on the matching records. - * @param policy - The Query Policy to use for this command. + * @param policy - The Write Policy to use for this command. * @param queryID - Job ID to use for the query; will be assigned * randomly if zero or undefined. * @param callback - The function to call when the command completes. * * @returns Promise that resolves to a Job instance. */ - public operate(operations: operations.Operation[], policy: policy.QueryPolicy | null, queryID: number| null, callback?: TypedCallback): void; + public operate(operations: operations.Operation[], policy: policy.WritePolicy | null, queryID: number| null, callback?: TypedCallback): void; } export namespace cdt { @@ -16921,9 +16921,17 @@ export namespace exp { */ export const digestModulo: _VAExp; + /** + * Create equal (==) expression. + * + * + * @param left - left expression in comparison. + * @param right - right expression in comparison. + * @return boolean value + */ export const eq: _cmpExp; /** - * Create equals (==) expression. + * Create not equal (!=) expression. * * * @param left - left expression in comparison. @@ -16932,7 +16940,7 @@ export namespace exp { */ export const ne: _cmpExp; /** - * Create not equal (!=) expression. + * Create a greater than (>) expression. * * * @param left - left expression in comparison. @@ -16940,372 +16948,372 @@ export namespace exp { * @return boolean value */ export const gt: _cmpExp; -/** - * Create a greater than or equals (>=) expression. - * - * - * @param {number} left left expression in comparison. - * @param {number} right right expression in comparison. - * @return {@link AerospikeExp} - boolean value - */ + /** + * Create a greater than or equals (>=) expression. + * + * + * @param {number} left left expression in comparison. + * @param {number} right right expression in comparison. + * @return {@link AerospikeExp} - boolean value + */ export const ge: _cmpExp; -/** - * Create a less than (<) expression. - * - * - * @param {number} left left expression in comparison. - * @param {number} right right expression in comparison. - * @return {@link AerospikeExp} - boolean value - */ + /** + * Create a less than (<) expression. + * + * + * @param {number} left left expression in comparison. + * @param {number} right right expression in comparison. + * @return {@link AerospikeExp} - boolean value + */ export const lt: _cmpExp; -/** - * Create a less than or equals (<=) expression. - * - * - * @param {number} left left expression in comparison. - * @param {number} right right expression in comparison. - * @return {@link AerospikeExp} - boolean value - */ + /** + * Create a less than or equals (<=) expression. + * + * + * @param {number} left left expression in comparison. + * @param {number} right right expression in comparison. + * @return {@link AerospikeExp} - boolean value + */ export const le: _cmpExp; -/** - * Create expression that performs a regex match on a string bin or value - * expression. - * - * - * @param {number} options POSIX regex flags defined in regex.h. - * @param {string} regex POSIX regex string. - * @param cmpStr String expression to compare against. - * @return {@link AerospikeExp} - boolean value - */ + /** + * Create expression that performs a regex match on a string bin or value + * expression. + * + * + * @param {number} options POSIX regex flags defined in regex.h. + * @param {string} regex POSIX regex string. + * @param cmpStr String expression to compare against. + * @return {@link AerospikeExp} - boolean value + */ export const cmpRegex: (options: regex, regex: string, cmpStr: AerospikeExp) => AerospikeExp; -/** - * Create a point within region or region contains point expression. - * - * - * @param left - left expression in comparison. - * @param right - right expression in comparison. - * @return boolean value - */ + /** + * Create a point within region or region contains point expression. + * + * + * @param left - left expression in comparison. + * @param right - right expression in comparison. + * @return boolean value + */ export const cmpGeo: _cmpExp; -/** - * Create "not" (!) operator expression. - * - * - * @param expr - Boolean expression to negate. - * @return boolean value - */ + /** + * Create "not" (!) operator expression. + * + * + * @param expr - Boolean expression to negate. + * @return boolean value + */ export const not: (expr: AerospikeExp) => AerospikeExp; -/** - * Create "and" (&&) operator that applies to a variable number of expressions. - * - * - * @param expr - Variable number of boolean expressions. Supports the spread operator. - * @return boolean value - */ + /** + * Create "and" (&&) operator that applies to a variable number of expressions. + * + * + * @param expr - Variable number of boolean expressions. Supports the spread operator. + * @return boolean value + */ export const and: _VAExp; -/** - * Create "or" (||) operator that applies to a variable number of expressions. - * - * - * @param expr - Variable number of boolean expressions. Supports the spread operator. - * @return boolean value - */ + /** + * Create "or" (||) operator that applies to a variable number of expressions. + * + * + * @param expr - Variable number of boolean expressions. Supports the spread operator. + * @return boolean value + */ export const or: _VAExp; -/** - * Create expression that returns true if only one of the expressions are true. - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of boolean expressions. Supports the spread operator. - * @return {@link AerospikeExp} - boolean value - */ + /** + * Create expression that returns true if only one of the expressions are true. + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of boolean expressions. Supports the spread operator. + * @return {@link AerospikeExp} - boolean value + */ export const exclusive: _VAExp; -/** - * Create "add" (+) operator that applies to a variable number of expressions. - * Return the sum of all arguments. - * All arguments must be the same type (integer or float). - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of integer or float expressions. Supports the spread operator. - * @return {@link AerospikeExp} integer or float value - */ + /** + * Create "add" (+) operator that applies to a variable number of expressions. + * Return the sum of all arguments. + * All arguments must be the same type (integer or float). + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of integer or float expressions. Supports the spread operator. + * @return {@link AerospikeExp} integer or float value + */ export const add: _VAExp; -/** - * Create "subtract" (-) operator that applies to a variable number of expressions. - * If only one argument is provided, return the negation of that argument. - * Otherwise, return the sum of the 2nd to Nth argument subtracted from the 1st - * argument. All arguments must resolve to the same type (integer or float). - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of integer or float expressions. Supports the spread operator. - * @return {@link AerospikeExp} integer or float value - */ + /** + * Create "subtract" (-) operator that applies to a variable number of expressions. + * If only one argument is provided, return the negation of that argument. + * Otherwise, return the sum of the 2nd to Nth argument subtracted from the 1st + * argument. All arguments must resolve to the same type (integer or float). + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of integer or float expressions. Supports the spread operator. + * @return {@link AerospikeExp} integer or float value + */ export const sub: _VAExp; -/** - * Create "multiply" (*) operator that applies to a variable number of expressions. - * Return the product of all arguments. If only one argument is supplied, return - * that argument. All arguments must resolve to the same type (integer or float). - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of integer or float expressions. Supports the spread operator. - * @return {@link AerospikeExp} integer or float value - */ + /** + * Create "multiply" (*) operator that applies to a variable number of expressions. + * Return the product of all arguments. If only one argument is supplied, return + * that argument. All arguments must resolve to the same type (integer or float). + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of integer or float expressions. Supports the spread operator. + * @return {@link AerospikeExp} integer or float value + */ export const mul: _VAExp; -/** - * Create "divide" (/) operator that applies to a variable number of expressions. - * If there is only one argument, returns the reciprocal for that argument. - * Otherwise, return the first argument divided by the product of the rest. - * All arguments must resolve to the same type (integer or float). - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of integer or float expressions. Supports the spread operator. - * @return {@link AerospikeExp} integer or float value - */ + /** + * Create "divide" (/) operator that applies to a variable number of expressions. + * If there is only one argument, returns the reciprocal for that argument. + * Otherwise, return the first argument divided by the product of the rest. + * All arguments must resolve to the same type (integer or float). + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of integer or float expressions. Supports the spread operator. + * @return {@link AerospikeExp} integer or float value + */ export const div: _VAExp; -/** - * Create "pow" operator that raises a "base" to the "exponent" power. - * All arguments must resolve to floats. - * Requires server version 5.6.0+. - * - * - * @param base - Base value. - * @param exponent - Exponent value. - * @return {@link AerospikeExp} float value - */ + /** + * Create "pow" operator that raises a "base" to the "exponent" power. + * All arguments must resolve to floats. + * Requires server version 5.6.0+. + * + * + * @param base - Base value. + * @param exponent - Exponent value. + * @return {@link AerospikeExp} float value + */ export const pow: _powExp; -/** - * Create "log" operator for logarithm of "num" with base "base". - * All arguments must resolve to floats. - * Requires server version 5.6.0+. - * - * - * @param num - Number. - * @param base - Base value. - * @return float value - */ + /** + * Create "log" operator for logarithm of "num" with base "base". + * All arguments must resolve to floats. + * Requires server version 5.6.0+. + * + * + * @param num - Number. + * @param base - Base value. + * @return float value + */ export const log: _logExp; -/** - * Create "modulo" (%) operator that determines the remainder of "numerator" - * divided by "denominator". All arguments must resolve to integers. - * Requires server version 5.6.0+. - * - * @param expr - Number to apply modulo to. - * @return integer value - */ + /** + * Create "modulo" (%) operator that determines the remainder of "numerator" + * divided by "denominator". All arguments must resolve to integers. + * Requires server version 5.6.0+. + * + * @param expr - Number to apply modulo to. + * @return integer value + */ export const mod: _VAExp; -/** - * Create operator that returns absolute value of a number. - * All arguments must resolve to integer or float. - * Requires server version 5.6.0+. - * - * @param expr - Number to calcuate absolute value from. - * @return number value - */ + /** + * Create operator that returns absolute value of a number. + * All arguments must resolve to integer or float. + * Requires server version 5.6.0+. + * + * @param expr - Number to calcuate absolute value from. + * @return number value + */ export const abs: _VAExp; -/** - * Create expression that rounds a floating point number down to the closest integer value. - * Requires server version 5.6.0+. - * - * - * @param expr - Floating point value to round down. - * @return float-value - */ + /** + * Create expression that rounds a floating point number down to the closest integer value. + * Requires server version 5.6.0+. + * + * + * @param expr - Floating point value to round down. + * @return float-value + */ export const floor: _VAExp; -/** - * Create expression that rounds a floating point number up to the closest integer value. - * Requires server version 5.6.0+. - * - * - * @param expr - Floating point value to round up. - * @return integer-value - */ + /** + * Create expression that rounds a floating point number up to the closest integer value. + * Requires server version 5.6.0+. + * + * + * @param expr - Floating point value to round up. + * @return integer-value + */ export const ceil: _VAExp; -/** - * Create expression that converts a float to an integer. - * Requires server version 5.6.0+. - * - * - * @param expr - Integer to convert to a float - * @return float value - */ + /** + * Create expression that converts a float to an integer. + * Requires server version 5.6.0+. + * + * + * @param expr - Integer to convert to a float + * @return float value + */ export const toInt: _VAExp; -/** - * Create expression that converts an integer to a float. - * Requires server version 5.6.0+. - * - * - * @param expr - Integer to convert to a float - * @return float value - */ + /** + * Create expression that converts an integer to a float. + * Requires server version 5.6.0+. + * + * + * @param expr - Integer to convert to a float + * @return float value + */ export const toFloat: _VAExp; -/** - * Create integer "and" (&) operator that is applied to two or more integers. - * All arguments must resolve to integers. - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of integer expressions. Compatible with spread operator. - * @return integer value - */ + /** + * Create integer "and" (&) operator that is applied to two or more integers. + * All arguments must resolve to integers. + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of integer expressions. Compatible with spread operator. + * @return integer value + */ export const intAnd: _VAExp; -/** - * Create integer "or" (|) operator that is applied to two or more integers. - * All arguments must resolve to integers. - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of integer expressions. Compatible with spread operator. - * @return integer value - */ + /** + * Create integer "or" (|) operator that is applied to two or more integers. + * All arguments must resolve to integers. + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of integer expressions. Compatible with spread operator. + * @return integer value + */ export const intOr: _VAExp; -/** - * Create integer "xor" (^) operator that is applied to two or more integers. - * All arguments must resolve to integers. - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of integer expressions. Compatible with spread operator. - * @return integer value - */ + /** + * Create integer "xor" (^) operator that is applied to two or more integers. + * All arguments must resolve to integers. + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of integer expressions. Compatible with spread operator. + * @return integer value + */ export const intXor: _VAExp; -/** - * Create integer "not" (~) operator. - * Requires server version 5.6.0+. - * - * - * @param expr - Integer expression. - * @return integer value - */ + /** + * Create integer "not" (~) operator. + * Requires server version 5.6.0+. + * + * + * @param expr - Integer expression. + * @return integer value + */ export const intNot: _VAExp; -/** - * Create integer "left shift" (<<) operator. - * Requires server version 5.6.0+. - * - * - * @param expr - Integer expression. - * @param shift - Number of bits to shift by. - * @return integer value - */ + /** + * Create integer "left shift" (<<) operator. + * Requires server version 5.6.0+. + * + * + * @param expr - Integer expression. + * @param shift - Number of bits to shift by. + * @return integer value + */ export const intLshift: _shiftExp; -/** - * Create integer "logical right shift" (>>>) operator. - * Requires server version 5.6.0+. - * - * - * @param expr - Integer expression. - * @param shift - Number of bits to shift by. - * @return integer value - */ + /** + * Create integer "logical right shift" (>>>) operator. + * Requires server version 5.6.0+. + * + * + * @param expr - Integer expression. + * @param shift - Number of bits to shift by. + * @return integer value + */ export const intRshift: _shiftExp; -/** - * Create integer "arithmetic right shift" (>>) operator. - * Requires server version 5.6.0+. - * - * - * @param expr - Integer expression. - * @param shift - Number of bits to shift by. - * @return integer value - */ + /** + * Create integer "arithmetic right shift" (>>) operator. + * Requires server version 5.6.0+. + * + * + * @param expr - Integer expression. + * @param shift - Number of bits to shift by. + * @return integer value + */ export const intArshift: _shiftExp; -/** - * Create expression that returns count of integer bits that are set to 1. - * Requires server version 5.6.0+. - * - * - * @param expr - {@link AerospikeExp} integer - * @return integer value - */ + /** + * Create expression that returns count of integer bits that are set to 1. + * Requires server version 5.6.0+. + * + * + * @param expr - {@link AerospikeExp} integer + * @return integer value + */ export const intCount: _VAExp; -/** - * Create expression that scans integer bits from left (most significant bit) to - * right (least significant bit), looking for a search bit value. When the - * search value is found, the index of that bit (where the most significant bit is - * index 0) is returned. If "search" is true, the scan will search for the bit - * value 1. If "search" is false it will search for bit value 0. - * Requires server version 5.6.0+. - * - * - * @param expr - {@link AerospikeExp} integer - * @return integer value - */ + /** + * Create expression that scans integer bits from left (most significant bit) to + * right (least significant bit), looking for a search bit value. When the + * search value is found, the index of that bit (where the most significant bit is + * index 0) is returned. If "search" is true, the scan will search for the bit + * value 1. If "search" is false it will search for bit value 0. + * Requires server version 5.6.0+. + * + * + * @param expr - {@link AerospikeExp} integer + * @return integer value + */ export const intLscan: _VAExp; -/** - * Create expression that scans integer bits from right (least significant bit) to - * left (most significant bit), looking for a search bit value. When the - * search value is found, the index of that bit (where the most significant bit is - * index 0) is returned. If "search" is true, the scan will search for the bit - * value 1. If "search" is false it will search for bit value 0. - * Requires server version 5.6.0+. - * - * - * @param expr - {@link AerospikeExp} integer - * @return integer value - */ + /** + * Create expression that scans integer bits from right (least significant bit) to + * left (most significant bit), looking for a search bit value. When the + * search value is found, the index of that bit (where the most significant bit is + * index 0) is returned. If "search" is true, the scan will search for the bit + * value 1. If "search" is false it will search for bit value 0. + * Requires server version 5.6.0+. + * + * + * @param expr - {@link AerospikeExp} integer + * @return integer value + */ export const intRscan: _VAExp; -/** - * Create expression that returns the minimum value in a variable number of expressions. - * All arguments must be the same type (integer or float). - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of integer or float expressions. Compatible with spread operator. - * @return integer or float value - */ + /** + * Create expression that returns the minimum value in a variable number of expressions. + * All arguments must be the same type (integer or float). + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of integer or float expressions. Compatible with spread operator. + * @return integer or float value + */ export const min: _VAExp; -/** - * Create expression that returns the maximum value in a variable number of expressions. - * All arguments must be the same type (integer or float). - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of integer or float expressions. - * @return integer or float value - */ + /** + * Create expression that returns the maximum value in a variable number of expressions. + * All arguments must be the same type (integer or float). + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of integer or float expressions. + * @return integer or float value + */ export const max: _VAExp; -/** - * Conditionally select an expression from a variable number of expression pairs - * followed by default expression action. Requires server version 5.6.0+. - * - * - * @param expr - spread of expressions. - * @return first action expression where bool expression is true or action-default. - */ + /** + * Conditionally select an expression from a variable number of expression pairs + * followed by default expression action. Requires server version 5.6.0+. + * + * + * @param expr - spread of expressions. + * @return first action expression where bool expression is true or action-default. + */ export const cond: _VAExp; -/** - * Define variables and expressions in scope. - * Requires server version 5.6.0+. - * - * - * @param expr - Variable number of expression def followed by a scoped - * expression. Supports the spread operator - * @return result of scoped expression. - */ + /** + * Define variables and expressions in scope. + * Requires server version 5.6.0+. + * + * + * @param expr - Variable number of expression def followed by a scoped + * expression. Supports the spread operator + * @return result of scoped expression. + */ const letValue: _VAExp; // Your implementation export { letValue as let }; // Export as `let` -/** - * Assign variable to an expression that can be accessed later. - * Requires server version 5.6.0+. - * - * - * @param varName - Variable name. - * @param expr - The variable is set to the result of expr. - * @return A variable name expression pair. - */ + /** + * Assign variable to an expression that can be accessed later. + * Requires server version 5.6.0+. + * + * + * @param varName - Variable name. + * @param expr - The variable is set to the result of expr. + * @return A variable name expression pair. + */ export const def: (varName: string, expr: AerospikeExp) => AerospikeExp; -/** - * Retrieve expression value from a variable. - * Requires server version 5.6.0+. - * - * - * @param varName - Variable name. - * @return value stored in variable. - */ + /** + * Retrieve expression value from a variable. + * Requires server version 5.6.0+. + * + * + * @param varName - Variable name. + * @return value stored in variable. + */ export const _var: (varName: string) => AerospikeExp; } /**