<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.5">
  <compounddef id="group__batch" kind="group">
    <compoundname>batch</compoundname>
    <title>Batch functions</title>
    <innerclass refid="structint__put__update__t" prot="public">int_put_update_t</innerclass>
    <innerclass refid="structblob__put__update__t" prot="public">blob_put_update_t</innerclass>
    <innerclass refid="structqdb__operation__t" prot="public">qdb_operation_t</innerclass>
      <sectiondef kind="func">
      <memberdef kind="function" id="group__batch_1ga0df145ef58f67af59b88553dd3d8ed70" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__attr_1ga008cbf050a89152ec67d33e534cd3012" kindref="member">QDB_API_LINKAGE</ref> <ref refid="group__error_1ga365e768c3ca0f6387d8798eb98c40443" kindref="member">qdb_error_t</ref></type>
        <definition>QDB_API_LINKAGE qdb_error_t qdb_init_operations</definition>
        <argsstring>(qdb_operation_t *operations, size_t operation_count)</argsstring>
        <name>qdb_init_operations</name>
        <param>
          <type><ref refid="structqdb__operation__t" kindref="compound">qdb_operation_t</ref> *</type>
          <declname>operations</declname>
        </param>
        <param>
          <type>size_t</type>
          <declname>operation_count</declname>
        </param>
        <briefdescription>
<para>Initializes an array of <ref refid="structqdb__operation__t" kindref="compound">qdb_operation_t</ref>. </para>        </briefdescription>
        <detaileddescription>
<para>Use this function to make sure all the fields of the operation structure are properly initialized to their default values.</para><para>After this function has been called, the user must then set the required parameter for each operation.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>operations</parametername>
</parameternamelist>
<parameterdescription>
<para>A pointer to an array of operations</para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>operation_count</parametername>
</parameternamelist>
<parameterdescription>
<para>The number of elements in the array of operations</para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>A <ref refid="group__error_1gab1b09622035af18ab20ed4fd3b61dd46" kindref="member">qdb_error_t</ref> code indicating success or failure. </para></simplesect>
<simplesect kind="see"><para><ref refid="structqdb__operation__t" kindref="compound">qdb_operation_t</ref> </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/mnt/resource/TeamCity/work/3d07d6036e644765/api/include/qdb/batch.h" line="276" column="1"/>
      </memberdef>
      <memberdef kind="function" id="group__batch_1gab7b2123fa8843971ce325573c224fd7a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__attr_1ga008cbf050a89152ec67d33e534cd3012" kindref="member">QDB_API_LINKAGE</ref> size_t</type>
        <definition>QDB_API_LINKAGE size_t qdb_run_batch</definition>
        <argsstring>(qdb_handle_t handle, qdb_operation_t *operations, size_t operation_count)</argsstring>
        <name>qdb_run_batch</name>
        <param>
          <type><ref refid="group__client_1ga720fb72da4197685cc354214e96796c1" kindref="member">qdb_handle_t</ref></type>
          <declname>handle</declname>
        </param>
        <param>
          <type><ref refid="structqdb__operation__t" kindref="compound">qdb_operation_t</ref> *</type>
          <declname>operations</declname>
        </param>
        <param>
          <type>size_t</type>
          <declname>operation_count</declname>
        </param>
        <briefdescription>
<para>Runs the operations in batch. </para>        </briefdescription>
        <detaileddescription>
<para>When operations are run in batch the order of execution is optimized for speed and each operation is run independently.</para><para>Running operations is batch is generally the best way to achieve a very high level of performance, especially for bulk loading of data. That&apos;s because batches minimize network communication and organize the order of execution for maximum throughput.</para><para>If one or several operations within the batch fail, the rest of the batch isn&apos;t affected.</para><para>If one or several operations within the batch is ill-formed, the whole batch will be aborted. An ill formed operation is for example an operation missing a parameter.</para><para>Each operation will result a result according to its type.</para><para>After a batch has been run (successful or not), the user must call <ref refid="group__client_1ga31b15fb83e60b9cb16504618616f29f3" kindref="member">qdb_release</ref> on the operations pointer to release all API-allocated buffers.</para><para>For an ordered, transactional &quot;all or nothing&quot; behavior use <ref refid="group__batch_1ga563bf54b6bafcd0cc984850feb595448" kindref="member">qdb_run_transaction</ref>.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>handle</parametername>
</parameternamelist>
<parameterdescription>
<para>A valid handle previously initialized by <ref refid="group__client_1gaa86900c81459a8d60b9b7b042371fa1e" kindref="member">qdb_open</ref> or <ref refid="group__client_1gab7a783a4a0cc73211ad96b9685f2c67e" kindref="member">qdb_open_tcp</ref>.</para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>operations</parametername>
</parameternamelist>
<parameterdescription>
<para>A pointer to a correctly constructed array of operations</para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>operation_count</parametername>
</parameternamelist>
<parameterdescription>
<para>The number of elements in the array of operations</para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The number of successful operations in the batch.</para></simplesect>
<simplesect kind="see"><para><ref refid="structqdb__operation__t" kindref="compound">qdb_operation_t</ref>, <ref refid="group__batch_1ga563bf54b6bafcd0cc984850feb595448" kindref="member">qdb_run_transaction</ref>, <ref refid="group__client_1ga31b15fb83e60b9cb16504618616f29f3" kindref="member">qdb_release</ref> </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/mnt/resource/TeamCity/work/3d07d6036e644765/api/include/qdb/batch.h" line="317" column="1"/>
      </memberdef>
      <memberdef kind="function" id="group__batch_1ga563bf54b6bafcd0cc984850feb595448" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__attr_1ga008cbf050a89152ec67d33e534cd3012" kindref="member">QDB_API_LINKAGE</ref> <ref refid="group__error_1ga365e768c3ca0f6387d8798eb98c40443" kindref="member">qdb_error_t</ref></type>
        <definition>QDB_API_LINKAGE qdb_error_t qdb_run_transaction</definition>
        <argsstring>(qdb_handle_t handle, qdb_operation_t *operations, size_t operation_count, size_t *failed_index)</argsstring>
        <name>qdb_run_transaction</name>
        <param>
          <type><ref refid="group__client_1ga720fb72da4197685cc354214e96796c1" kindref="member">qdb_handle_t</ref></type>
          <declname>handle</declname>
        </param>
        <param>
          <type><ref refid="structqdb__operation__t" kindref="compound">qdb_operation_t</ref> *</type>
          <declname>operations</declname>
        </param>
        <param>
          <type>size_t</type>
          <declname>operation_count</declname>
        </param>
        <param>
          <type>size_t *</type>
          <declname>failed_index</declname>
        </param>
        <briefdescription>
<para>Runs the operations in a single transaction. </para>        </briefdescription>
        <detaileddescription>
<para>Operations that run in a transaction will be executed ordered to preserve the logic of the transaction and if an error occurred the previously executed operations will be rolled back.</para><para>The operation is committed if and only if all operations have been successful.</para><para>The result of the transaction is not visible by other clients until it has been committed.</para><para>After a transaction has been run (successful or not), the user must call <ref refid="group__client_1ga31b15fb83e60b9cb16504618616f29f3" kindref="member">qdb_release</ref> on operations to release all API-allocated buffers.</para><para>Use transactions when integrity and order is paramount. For maximum performances consider using batches (<ref refid="group__batch_1gab7b2123fa8843971ce325573c224fd7a" kindref="member">qdb_run_batch</ref>).</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>handle</parametername>
</parameternamelist>
<parameterdescription>
<para>A valid handle previously initialized by <ref refid="group__client_1gaa86900c81459a8d60b9b7b042371fa1e" kindref="member">qdb_open</ref> or <ref refid="group__client_1gab7a783a4a0cc73211ad96b9685f2c67e" kindref="member">qdb_open_tcp</ref>.</para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>operations</parametername>
</parameternamelist>
<parameterdescription>
<para>A pointer to a correctly constructed array of operations</para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>operation_count</parametername>
</parameternamelist>
<parameterdescription>
<para>The number of elements in the array of operations</para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>failed_index</parametername>
</parameternamelist>
<parameterdescription>
<para>A pointer to the index of the first failed operation</para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>A <ref refid="group__error_1gab1b09622035af18ab20ed4fd3b61dd46" kindref="member">qdb_error_t</ref> code indicating success or failure.</para></simplesect>
<simplesect kind="see"><para><ref refid="structqdb__operation__t" kindref="compound">qdb_operation_t</ref>, <ref refid="group__batch_1gab7b2123fa8843971ce325573c224fd7a" kindref="member">qdb_run_batch</ref>, <ref refid="group__client_1ga31b15fb83e60b9cb16504618616f29f3" kindref="member">qdb_release</ref> </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/mnt/resource/TeamCity/work/3d07d6036e644765/api/include/qdb/batch.h" line="355" column="1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="enum">
      <memberdef kind="enum" id="group__batch_1gaaaebee34ad682f0ba961780f59d765d4" prot="public" static="no">
        <name>qdb_operation_type_t</name>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a7686302cd1ce6c94e2572a28817210fd" prot="public">
          <name>qdb_op_uninitialized</name>
          <initializer>= -1</initializer>
          <briefdescription>
<para>Unitialized value. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a4bed7978a8e7f058c919bb9785dc00e4" prot="public">
          <name>qdb_op_blob_get</name>
          <initializer>= 0</initializer>
          <briefdescription>
<para>A blob get operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4ad8f5b00a4eb6a100f0cf26d60be72d25" prot="public">
          <name>qdb_op_blob_put</name>
          <initializer>= 1</initializer>
          <briefdescription>
<para>A blob put operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a4ada68b172af41831bbcef735f1e11cd" prot="public">
          <name>qdb_op_blob_update</name>
          <initializer>= 2</initializer>
          <briefdescription>
<para>A blob update operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a7de4a75f77b198a6a0e0855058386239" prot="public">
          <name>qdb_op_blob_cas</name>
          <initializer>= 4</initializer>
          <briefdescription>
<para>A blob compare and swap operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a89db036e3c5308ad4d8b19d197bc54b0" prot="public">
          <name>qdb_op_blob_get_and_update</name>
          <initializer>= 5</initializer>
          <briefdescription>
<para>A blob get and update. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a4411d4842c65bccf6877c7ceace9c025" prot="public">
          <name>qdb_op_has_tag</name>
          <initializer>= 8</initializer>
          <briefdescription>
<para>Tag existence test operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a925c976afb2896f99bdfa90359f5ff14" prot="public">
          <name>qdb_op_int_put</name>
          <initializer>= 9</initializer>
          <briefdescription>
<para>An integer put operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a69ce1cd8d4ffef775933a926ab98bcfb" prot="public">
          <name>qdb_op_int_update</name>
          <initializer>= 10</initializer>
          <briefdescription>
<para>An integer update operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a153f096496c868cb5c79d450506bd998" prot="public">
          <name>qdb_op_int_get</name>
          <initializer>= 11</initializer>
          <briefdescription>
<para>An integer get operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a52e5c4f75dce3f2f85e87d82bb840ee1" prot="public">
          <name>qdb_op_int_add</name>
          <initializer>= 12</initializer>
          <briefdescription>
<para>An integer increase/decrease operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4ab65f10ac39632bceb9bf27a308fcb553" prot="public">
          <name>qdb_op_get_entry_type</name>
          <initializer>= 13</initializer>
          <briefdescription>
<para>Entry type check. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <enumvalue id="batch_8h_1gaaaebee34ad682f0ba961780f59d765d4a2bf650762f0768bb7f9a9892d29361b7" prot="public">
          <name>qdb_op_value_get</name>
          <initializer>= 14</initializer>
          <briefdescription>
<para>A value get operation. </para>          </briefdescription>
          <detaileddescription>
          </detaileddescription>
        </enumvalue>
        <briefdescription>
<para>An enumeration of possible operation type. </para>        </briefdescription>
        <detaileddescription>
<para>Operations are used by batches and transactions. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/mnt/resource/TeamCity/work/3d07d6036e644765/api/include/qdb/batch.h" line="53" column="1" bodyfile="/mnt/resource/TeamCity/work/3d07d6036e644765/api/include/qdb/batch.h" bodystart="52" bodyend="80"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
  </compounddef>
</doxygen>
