quasardb C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Fields
qdb_operation_t Struct Reference

A single operation containing all parameters to execute the operation in a batch or in a transaction. More...

#include <batch.h>

Data Fields

qdb_operation_type_t type
 The type of the operation.
 
const char * alias
 
qdb_error_t error
 
union {
   struct {
      const char *   tag
 
   }   has_tag
 Tag specific operation parameters.
 
   struct {
      qdb_int_t   result
 
      qdb_int_t   addend
 The value to add or subtract to the entry.
 
   }   int_add
 Integer increment/decrement specific operation parameters.
 
   struct {
      qdb_int_t   result
 The result of the integer get operation.
 
   }   int_get
 Integer get specific operation parameters.
 
   int_put_update_t   int_put
 Integer put specific operation parameters.
 
   int_put_update_t   int_update
 Integer update specific operation parameters.
 
   blob_put_update_t   blob_put
 Blob put specific operation parameters.
 
   blob_put_update_t   blob_update
 Blob update specific operation parameters.
 
   struct {
      const void *   original_content
 
      qdb_size_t   original_content_size
 The size of the result buffer.
 
      const void *   new_content
 A pointer to the buffer with the data to be written.
 
      qdb_size_t   new_content_size
 The size of the buffer pointed by content.
 
      const void *   comparand
 A pointer to the comparand.
 
      qdb_size_t   comparand_size
 The size of the buffer pointed by comparand.
 
      qdb_size_t   comparand_offset
 
      qdb_time_t   expiry_time
 
   }   blob_cas
 Blob compare and swap specific operation parameters.
 
   struct {
      const void *   content
 
      qdb_size_t   content_size
 The size of the result buffer.
 
      qdb_size_t   content_offset
 
   }   blob_get
 Blob get specific operation parameters.
 
   struct {
      const void *   original_content
 
      qdb_size_t   original_content_size
 The size of the result buffer.
 
      const void *   new_content
 A pointer to the buffer with the data to be written.
 
      qdb_size_t   new_content_size
 The size of the buffer pointed by content.
 
      qdb_time_t   expiry_time
 
   }   blob_get_and_update
 Blob get and update specific operation parameters.
 
}; 
 Operation specific parameters.
 
qdb_entry_type_t type
 The result of the get entry type operation.
 

Detailed Description

A single operation containing all parameters to execute the operation in a batch or in a transaction.

You should initialize operations before usage with the qdb_init_operations function.

Field Documentation

const char* qdb_operation_t::alias

A pointer to a null-terminated UTF-8 string representing the alias of the entry.

qdb_size_t qdb_operation_t::comparand_offset

Optional offset for the comparand. Leave to 0 if not needed.

const void* qdb_operation_t::content

A pointer to the buffer containing the result of the blob operation This buffer is API-allocated and will be freed by a call to qdb_release

qdb_size_t qdb_operation_t::content_offset

Optional offset from which the content should be returned. Leave to 0 if not needed.

qdb_error_t qdb_operation_t::error

A qdb_error_t code indicating success or failure after the operation has been executed

qdb_time_t qdb_operation_t::expiry_time

The optional expiration time. Use qdb_never_expires for no expiration.

const void* qdb_operation_t::original_content

A pointer to the buffer containing the result of the blob operation, if any. This buffer is API-allocated and will be freed by a call to qdb_release

A pointer to the buffer containing the result of the blob operation This buffer is API-allocated and will be freed by a call to qdb_release

qdb_int_t qdb_operation_t::result

The result of the integer get operation.

A signed 64-bit integer representing the result of the operation

const char* qdb_operation_t::tag

A pointer to a null-terminated UTF-8 string representing the tag to test for existence


The documentation for this struct was generated from the following file: