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 {
   tag_update_attach_t   has_tag
 Has 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.
 
   struct {
      double   result
 
      double   addend
 The value to add or subtract to the entry.
 
   }   double_add
 Double increment/decrement specific operation parameters.
 
   struct {
      double   result
 The result of the double get operation.
 
   }   double_get
 Double get specific operation parameters.
 
   double_put_update_t   double_put
 Double put specific operation parameters.
 
   double_put_update_t   double_update
 Double 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 char *   original_content
 
      qdb_size_t   original_content_size
 The size of the result buffer.
 
      const char *   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 char *   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
 
   }   string_cas
 String 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.
 
   struct {
      const char *   original_content
 
      qdb_size_t   original_content_size
 The size of the result buffer.
 
      const char *   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
 
   }   string_get_and_update
 String get and update specific operation parameters.
 
   struct {
      const char *   content
 
      qdb_size_t   content_size
 The size of the result buffer.
 
      qdb_size_t   content_offset
 
   }   string_get
 String get specific operation parameters.
 
   struct {
      qdb_timespec_t   result
 The result of the double get operation.
 
   }   timestamp_get
 Timestamp get specific operation parameters.
 
   timestamp_put_update_t   timestamp_put
 Timestamp put specific operation parameters.
 
   timestamp_put_update_t   timestamp_update
 Timestamp update specific operation parameters.
 
   struct {
      qdb_timespec_t   result
 A timestamp representing the result of the operation.
 
      qdb_timespec_t   addend
 The value to add or subtract to the entry.
 
   }   timestamp_add
 Timestamp increment/decrement specific operation parameters.
 
   struct {
      qdb_entry_type_t   type
 The type of the entry returned by the get value operation.
 
      const void *   blob_content
 
      qdb_size_t   blob_content_size
 The size of the result buffer.
 
      qdb_int_t   int_result
 
      double   double_result
 
      qdb_timespec_t   timestamp_result
 
   }   value_get
 Value get specific operation parameters.
 
   struct {
      qdb_uint_t   bytes_trimmed
 
   }   trim_entry
 Trim entry specific operation parameters.
 
   tag_update_attach_t   tag_update
 Tag update specific operation parameters.
 
   tag_update_attach_t   tag_attach
 Tag attach specific operation parameters.
 
   tag_update_attach_t   tag_detach
 Tag detach specific operation parameters.
 
}; 
 Operation specific parameters.
 

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.

const void* qdb_operation_t::blob_content

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

qdb_uint_t qdb_operation_t::bytes_trimmed

The result of the trimming operation - number of bytes trimmed

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

const char* qdb_operation_t::content

A pointer to the buffer containing the result of the string 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.

double qdb_operation_t::double_result

The result of the get operation when the returned type is double

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.

qdb_int_t qdb_operation_t::int_result

The result of the get operation when the returned type is integer

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

const char* 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

double qdb_operation_t::result

The result of the double get operation.

A 64-bit floating-point representing the result of the operation

qdb_timespec_t qdb_operation_t::result

The result of the double get operation.

A timestamp representing the result of the operation.

qdb_timespec_t qdb_operation_t::timestamp_result

The result of the get operation when the returned type is timestap

qdb_entry_type_t qdb_operation_t::type

The result of the get entry type operation.

The type of the entry returned by the get value operation.


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