Fork me on GitHub

Chapter 17
Node API

17.1 Client Library

HyperDex provides Node bindings under the module hyperdex-client. This library wraps the HyperDex C Client library and enables use of native Javascript data types.

This module was re-introduced in HyperDex 1.2.0.

17.1.1 Building the HyperDex Node.js Binding

The HyperDex Node.js Binding must be built and installed after HyperDex is built and installed. After installing HyperDex, you can build the Node.js bindings from either source or git checkout with:

  % cd bindings/node.js
  % node rebuild

17.1.2 Using Node.js Within Your Application

All client operation are defined in the hyperdex_client module. You can access this in your program with:

  var hyperdex_client = require(’hyperdex-client’);

17.1.3 Hello World

The following is a minimal application that stores the value ”Hello World” and then immediately retrieves the value:

  var hyperdex_client = require(’hyperdex-client’)
  var c = new hyperdex_client.Client(’127.0.0.1’, 1982);

  
  function get_callback(obj, err) {
      if (err) { console.log(’error ’ + err); }

      console.log(’get: ’ + obj);
  }
  
  function put_callback(success, err) {

      if (err) { console.log(’error ’ + err); }
      console.log(’put: ’ + success);

      c.get(’kv’, ’k’, get_callback);
  }
  
  c.put(’kv’, ’k’, {v: ’Hello World!’}, put_callback);

You can run this example with:

  % node hello-world.js
  put: true
  get: [object Object]

Right away, there are several points worth noting in this example:

17.1.4 Asynchronous Operations

HyperDex provides native integration with the asynchronous world of Node.js. You can issue several operations concurrently, and Node.js and HyperDex will work together to complete these operations quickly and efficiently. It’s easy to work with data concurrently. A common pattern is to keep a constant number of operations outstanding concurrently:

  var hyperdex_client = require(’hyperdex-client’)
  var c = new hyperdex_client.Client(’127.0.0.1’, 1982);

  
  var NUMBER = 10000000
  var CONCURRENT = 1000
  var i = 0
  
  function put (success, err) {

      if (i < THRESH) {
          c.put(’kv’, new String(i), {v: new String(i), put);
      }

      i += 1;
  }
  
  for (var x = 0; x < CONCURRENT; ++x) {
      put();
  }

17.1.5 Data Structures

The Node bindings automatically manage conversion of data types from Javascript to HyperDex types, enabling applications to be written in idiomatic Javascript.

17.1.5.1 Examples

This section shows examples of Java data structures that are recognized by HyperDex. The examples here are for illustration purposes and are not exhaustive. Strings  The HyperDex client recognizes Javascript strings and buffers and automatically converts them to HyperDex strings. For example, the following two calls have the same effect:

  c.put("kv", "somekey", {v: "somevalue"}, function (success, err) {});
  c.put("kv", "somekey", {v: new Buffer("somevalue")}, function (success, err) {});
Integers  The HyperDex client recognizes Javascript numbers and can convert them to HyperDex integers. For example:
  c.put("kv", "somekey", {v: c.asInt(42)}, function (success, err) {});
Floats  The HyperDex client recognizes Javascript numbers and can convert them to HyperDex floats. For example:
  c.put("kv", "somekey", {v: c.asFloat(3.1415)}, function (success, err) {});
Lists  The HyperDex client permits users to construct HyperDex lists from Javascript. For example:
  c.put("kv", "somekey", {v: c.asList([’a’, ’b’, ’c’])}, function (success, err) {});
  c.put("kv", "somekey", {v: c.asList([1, 2, 3])}, function (success, err) {});
  c.put("kv", "somekey", {v: c.asList([1.0, 0.5, 0.25])}, function (success, err) {});
Sets  The HyperDex client permits users to construct HyperDex sets from Javascript. For example:
  c.put("kv", "somekey", {v: c.asSet([’a’, ’b’, ’c’])}, function (success, err) {});
  c.put("kv", "somekey", {v: c.asSet([1, 2, 3])}, function (success, err) {});
  c.put("kv", "somekey", {v: c.asSet([1.0, 0.5, 0.25])}, function (success, err) {});
Maps  The HyperDex client permits users to construct HyperDex maps from Javascript. For example:
  c.put("kv", "somekey", {v1: c.asMap([["k", "v"]])}, function(success, err) {});
  c.put("kv", "somekey", {v2: c.asMap([[1, 2]])}, function(success, err) {});
  c.put("kv", "somekey", {v3: c.asMap([[3.14, 0.125]])}, function(success, err) {});
  c.put("kv", "somekey", {v4: c.asMap([["a", 1]])}, function(success, err) {});

17.1.6 Attributes

Attributes in Node are specified in the form of a Javascript object. As you can see in the examples above, attributes are specified in the form:

  {name: "value"}

17.1.7 Operations

17.1.7.1 get

Retrieve an object from space using key. Definition: 

  get(spacename, key, function (obj, done, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.2 get_partial

Retrieve part of an object from space using key. Only the specified attributes of the object will be returned to the client. Definition: 

  get_partial(spacename, key, attributenames, function (obj, done, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.3 put

Store or update an object by key. The object’s attributes will be set to the values specified by attrs. If the object exists, it will be updated and all existing values not altered by attrs will be preserved. If the object does not exist, a new object will be created, with its attributes initialized to their default values. Definition: 

  put(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.4 cond_put

Conditionally update an the object stored under key in space. Existing values will be overwitten with the values specified by attrs. Values not specified by attrs will remain unchanged. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_put(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.5 group_put

Update all objects stored in space that match checks. Existing values will be overwitten with the values specified by attrs. Values not specified by attrs will remain unchanged.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_put(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.6 put_if_not_exist

Store or object under key in space if and only if the operation creates a new object. The object’s attributes will be set to the values specified by attrs; any attributes not specified by attrs will be initialized to their defaults. If the object exists, the operation will fail with CMPFAIL. Definition: 

  put_if_not_exist(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.7 del

Delete key from space. If no object exists, the operation will fail with NOTFOUND. Definition: 

  del(spacename, key, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.8 cond_del

Conditionally delete the object stored under key from space. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_del(spacename, key, predicates, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.9 group_del

Delete all objects that match the specified checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_del(spacename, predicates, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.10 atomic_add

Add the specified number to the existing value for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_add(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.11 cond_atomic_add

Add the specified number to the existing value for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_add(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.12 group_atomic_add

Add the specified number to the existing value for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_add(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.13 atomic_sub

Subtract the specified number from the existing value for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_sub(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.14 cond_atomic_sub

Subtract the specified number from the existing value for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_sub(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.15 group_atomic_sub

Subtract the specified number from the existing value for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_sub(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.16 atomic_mul

Multiply the existing value by the specified number for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_mul(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.17 cond_atomic_mul

Multiply the existing value by the specified number for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_mul(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.18 group_atomic_mul

Multiply the existing value by the specified number for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_mul(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.19 atomic_div

Divide the existing value by the specified number for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_div(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.20 cond_atomic_div

Divide the existing value by the specified number for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_div(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.21 group_atomic_div

Divide the existing value by the specified number for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_div(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.22 atomic_mod

Store the existing value modulo the specified number for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_mod(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.23 cond_atomic_mod

Store the existing value modulo the specified number for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_mod(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.24 group_atomic_mod

Store the existing value modulo the specified number for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_mod(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.25 atomic_and

Store the bitwise AND of the existing value and the specified number for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_and(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.26 cond_atomic_and

Store the bitwise AND of the existing value and the specified number for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_and(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.27 group_atomic_and

Store the bitwise AND of the existing value and the specified number for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_and(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.28 atomic_or

Store the bitwise OR of the existing value and the specified number for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_or(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.29 cond_atomic_or

Store the bitwise OR of the existing value and the specified number for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_or(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.30 group_atomic_or

Store the bitwise OR of the existing value and the specified number for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_or(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.31 atomic_xor

Store the bitwise XOR of the existing value and the specified number for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_xor(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.32 cond_atomic_xor

Store the bitwise XOR of the existing value and the specified number for each attribute if and only if checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_xor(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.33 group_atomic_xor

Store the bitwise XOR of the existing value and the specified number for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_xor(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.34 atomic_min

Store the minimum of the existing value and the provided value for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_min(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.35 cond_atomic_min

Store the minimum of the existing value and the provided value for each attribute if and only if checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_min(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.36 group_atomic_min

Store the minimum of the existing value and the provided value for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_min(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.37 atomic_max

Store the maximum of the existing value and the provided value for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  atomic_max(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.38 cond_atomic_max

Store the maximum of the existing value and the provided value for each attribute if and only if checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_atomic_max(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.39 group_atomic_max

Store the maximum of the existing value and the provided value for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_atomic_max(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.40 string_prepend

Prepend the specified string to the existing value for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  string_prepend(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.41 cond_string_prepend

Prepend the specified string to the existing value for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_string_prepend(
          spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.42 group_string_prepend

Prepend the specified string to the existing value for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_string_prepend(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.43 string_append

Append the specified string to the existing value for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  string_append(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.44 cond_string_append

Append the specified string to the existing value for each attribute if and only if checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_string_append(
          spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.45 group_string_append

Append the specified string to the existing value for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_string_append(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.46 list_lpush

Push the specified value onto the front of the list for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  list_lpush(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.47 cond_list_lpush

Push the specified value onto the front of the list for each attribute if and only if checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_list_lpush(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.48 group_list_lpush

Push the specified value onto the front of the list for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_list_lpush(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.49 list_rpush

Push the specified value onto the back of the list for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  list_rpush(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.50 cond_list_rpush

Push the specified value onto the back of the list for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_list_rpush(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.51 group_list_rpush

Push the specified value onto the back of the list for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_list_rpush(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.52 set_add

Add the specified value to the set for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  set_add(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.53 cond_set_add

Add the specified value to the set for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_set_add(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.54 group_set_add

Add the specified value to the set for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_set_add(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.55 set_remove

Remove the specified value from the set. If the value is not contained within the set, this operation will do nothing. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  set_remove(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.56 cond_set_remove

Remove the specified value from the set if and only if the checks hold on the object. If the value is not contained within the set, this operation will do nothing. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_set_remove(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.57 group_set_remove

Remove the specified value from the set for each object in space that matches checks. If the value is not contained within the set, this operation will do nothing.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_set_remove(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.58 set_intersect

Store the intersection of the specified set and the existing value for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  set_intersect(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.59 cond_set_intersect

Store the intersection of the specified set and the existing value for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_set_intersect(
          spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.60 group_set_intersect

Store the intersection of the specified set and the existing value for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_set_intersect(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.61 set_union

Store the union of the specified set and the existing value for each attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  set_union(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.62 cond_set_union

Store the union of the specified set and the existing value for each attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_set_union(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.63 group_set_union

Store the union of the specified set and the existing value for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_set_union(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.64 document_rename

Move a field within a document from one name to another. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  document_rename(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.65 cond_document_rename

Move a field within a document from one name to another if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_document_rename(
          spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.66 group_document_rename

Move a field within a document from one name to another for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_document_rename(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.67 document_unset

Remove a field or object from a document. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  document_unset(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.68 cond_document_unset

Remove a field or object from a document if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_document_unset(
          spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.69 group_document_unset

Remove a field or object from a document for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_document_unset(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.70 map_add

Insert a key-value pair into the map specified by each map-attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_add(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.71 cond_map_add

Insert a key-value pair into the map specified by each map-attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_add(spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.72 group_map_add

Insert a key-value pair into the map specified by each map-attribute for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_add(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.73 map_remove

Remove a key-value pair from the map specified by each attribute. If there is no pair with the specified key within the map, this operation will do nothing. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_remove(spacename, key, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.74 cond_map_remove

Remove a key-value pair from the map specified by each attribute if and only if checks hold on the object. If there is no pair with the specified key within the map, this operation will do nothing. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_remove(spacename, key, predicates, attributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.75 group_map_remove

Remove a key-value pair from the map specified by each attribute for each object in space that matches checks. If there is no pair with the specified key within the map, this operation will do nothing.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_remove(spacename, predicates, attributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.76 map_atomic_add

Add the specified number to the value of a key-value pair within each map. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_add(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.77 cond_map_atomic_add

Add the specified number to the value of a key-value pair within each map if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_add(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.78 group_map_atomic_add

Add the specified number to the value of a key-value pair within each map for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_add(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.79 map_atomic_sub

Subtract the specified number from the value of a key-value pair within each map. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_sub(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.80 cond_map_atomic_sub

Subtract the specified number from the value of a key-value pair within each map if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_sub(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.81 group_map_atomic_sub

Subtract the specified number from the value of a key-value pair within each map for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_sub(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.82 map_atomic_mul

Multiply the value of each key-value pair by the specified number for each map. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_mul(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.83 cond_map_atomic_mul

Multiply the value of each key-value pair by the specified number for each map attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_mul(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.84 group_map_atomic_mul

Multiply the value of each key-value pair by the specified number for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_mul(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.85 map_atomic_div

Divide the value of each key-value pair by the specified number for each map. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_div(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.86 cond_map_atomic_div

Divide the value of each key-value pair by the specified number for each map if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_div(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.87 group_map_atomic_div

Divide the value of each key-value pair by the specified number for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_div(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.88 map_atomic_mod

Store the value of the key-value pair modulo the specified number for each map. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_mod(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.89 cond_map_atomic_mod

Store the value of the key-value pair modulo the specified number for each map attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_mod(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.90 group_map_atomic_mod

Store the value of the key-value pair modulo the specified number for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_mod(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.91 map_atomic_and

Store the bitwise AND of the value of the key-value pair and the specified number for each map. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_and(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.92 cond_map_atomic_and

Store the bitwise AND of the value of the key-value pair and the specified number for each map attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_and(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.93 group_map_atomic_and

Store the bitwise AND of the value of the key-value pair and the specified number for each map attribute for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_and(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.94 map_atomic_or

Store the bitwise OR of the value of the key-value pair and the specified number for each map. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_or(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.95 cond_map_atomic_or

Store the bitwise OR of the value of the key-value pair and the specified number for each map attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_or(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.96 group_map_atomic_or

Store the bitwise OR of the value of the key-value pair and the specified number for each map attribute for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_or(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.97 map_atomic_xor

Store the bitwise XOR of the value of the key-value pair and the specified number for each map attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_xor(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.98 cond_map_atomic_xor

Store the bitwise XOR of the value of the key-value pair and the specified number for each map attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_xor(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.99 group_map_atomic_xor

Store the bitwise XOR of the value of the key-value pair and the specified number for each map attribute for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_xor(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.100 map_string_prepend

Prepend the specified string to the value of the key-value pair for each map. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_string_prepend(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.101 cond_map_string_prepend

Prepend the specified string to the value of the key-value pair for each map attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_string_prepend(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.102 group_map_string_prepend

Prepend the specified string to the value of the key-value pair for each map attribute for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_string_prepend(
          spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.103 map_string_append

Append the specified string to the value of the key-value pair for each map attribute. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_string_append(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.104 cond_map_string_append

Append the specified string to the value of the key-value pair for each map attribute if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_string_append(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.105 group_map_string_append

Append the specified string to the value of the key-value pair for each map attribute for each object in space that matches checks

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_string_append(
          spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.106 map_atomic_min

Take the minium of the specified value and existing value for each key-value pair. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_min(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.107 cond_map_atomic_min

Take the minium of the specified value and existing value for each key-value pair if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_min(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.108 group_map_atomic_min

Take the minium of the specified value and existing value for each key-value pair for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_min(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.109 map_atomic_max

Take the maximum of the specified value and existing value for each key-value pair. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND. Definition: 

  map_atomic_max(spacename, key, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.110 cond_map_atomic_max

Take the maximum of the specified value and existing value for each key-value pair if and only if the checks hold on the object. This operation requires a pre-existing object in order to complete successfully. If no object exists, the operation will fail with NOTFOUND.

This operation will succeed if and only if the predicates specified by checks hold on the pre-existing object. If any of the predicates are not true for the existing object, then the operation will have no effect and fail with CMPFAIL.

All checks are atomic with the write. HyperDex guarantees that no other operation will come between validating the checks, and writing the new version of the object.. Definition: 

  cond_map_atomic_max(
          spacename, key, predicates, mapattributes, function (success, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.111 group_map_atomic_max

Take the maximum of the specified value and existing value for each key-value pair for each object in space that matches checks.

This operation will only affect objects that match the provided checks. Objects that do not match checks will be unaffected by the group call. Each object that matches checks will be atomically updated with the check on the object. HyperDex guarantees that no object will be altered if the checks do not pass at the time of the write. Objects that are updated concurrently with the group call may or may not be updated; however, regardless of any other concurrent operations, the preceding guarantee will always hold. Definition: 

  group_map_atomic_max(spacename, predicates, mapattributes, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.
17.1.7.112 search

Return all objects that match the specified checks. This operation behaves as an iterator and may return multiple objects from the single call. Definition: 

  search(spacename, predicates, function (obj, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

The second argument is a true/false value indicating whether the operation is complete. The callback will be called repeatedly until all objects are returned or encounter errors.

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.113 sorted_search

Return all objects that match the specified checks, sorted according to attr. This operation behaves as an iterator and may return multiple objects from the single call. Definition: 

  sorted_search(spacename, predicates, sortby, limit, maxmin, function (obj, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will indicate success or failure of the operation with one of the following values:

The second argument is a true/false value indicating whether the operation is complete. The callback will be called repeatedly until all objects are returned or encounter errors.

If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.7.114 count

Count the number of objects that match the specified checks. This will return the number of objects counted by the search. If an error occurs during the count, the count may reflect a partial count. The real count will be higher than the returned value.

A count is the server-side equivalent of performing a search, and counting the number of objects that exist. For that reason, its efficiency closely follows that of search, except it will not transfer any objects over the network. Definition: 

  count(spacename, predicates, function (count, err) {})
Parameters:  Returns:  This function returns via the provided callback. In the normal case, the first argument will be the total number of objects that match the predicate. If the operation encounters any error, the error argument will be provided and will specify the error, in which case the first argument is undefined.

17.1.8 Working with Signals

The HyperDex client module is signal-safe. Should a signal interrupt the client, it will raise an exception with status HYPERDEX_CLIENT_INTERRUPTED.

17.1.9 Working with Events

The Node module naturally integrates with the Node.js event loop. Each instance of Client registers itself with the Node event loop and makes callbacks as soon as events complete on the HyperDex side.

Put simply, a Node.js application can use Client instances in a straight-forward fashion without worrying about threading or manual integration.