> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# gpudb::ExecuteSqlRequest

> gpudb::ExecuteSqlRequest — Kinetica C++ API

<div className="kinetica-doxygen">
  <div className="contents">
    <p>A set of parameters for <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a6b771232d18e050420781df48d656cf1">GPUdb::executeSql</a>. <a href="#details">More...</a></p>
    <p><code>#include \<<a className="el" href="/content/api/cpp/execute__sql_8h_source">gpudb/protocol/execute\_sql.h</a>></code></p>

    <table className="memberdecls">
      <tr className="heading">
        <td colSpan="2">
          <h2 className="groupheader"> Public Member Functions</h2>
        </td>
      </tr>

      <tr className="memitem:a9d3aa3fde70c4ab3488724f2ba856899" id="r_a9d3aa3fde70c4ab3488724f2ba856899">
        <td className="memItemLeft" align="right" valign="top"> </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a9d3aa3fde70c4ab3488724f2ba856899">ExecuteSqlRequest</a> ()</td>
      </tr>

      <tr className="memdesc:a9d3aa3fde70c4ab3488724f2ba856899">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Constructs an <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest" title="A set of parameters for GPUdb::executeSql.">ExecuteSqlRequest</a> object with default parameters. <br /></td>
      </tr>

      <tr className="separator:a9d3aa3fde70c4ab3488724f2ba856899">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:a8d3bedab001656623233f7d2e5801df1" id="r_a8d3bedab001656623233f7d2e5801df1">
        <td className="memItemLeft" align="right" valign="top"> </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a8d3bedab001656623233f7d2e5801df1">ExecuteSqlRequest</a> (const std::string \&statement\_, const int64\_t offset\_, const int64\_t limit\_, const std::string \&requestSchemaStr\_, const std::vector\< std::vector\< uint8\_t > > \&data\_, const std::map\< std::string, std::string > \&options\_)</td>
      </tr>

      <tr className="memdesc:a8d3bedab001656623233f7d2e5801df1">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Constructs an <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest" title="A set of parameters for GPUdb::executeSql.">ExecuteSqlRequest</a> object with the specified parameters. <br /></td>
      </tr>

      <tr className="separator:a8d3bedab001656623233f7d2e5801df1">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:ac3ceb6b9b592b3bd68c8c6f872c9708d" id="r_ac3ceb6b9b592b3bd68c8c6f872c9708d">
        <td className="memItemLeft" align="right" valign="top"> </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#ac3ceb6b9b592b3bd68c8c6f872c9708d">ExecuteSqlRequest</a> (const std::string \&statement\_, const int64\_t offset\_, const int64\_t limit\_, const std::string \&encoding\_, const std::string \&requestSchemaStr\_, const std::vector\< std::vector\< uint8\_t > > \&data\_, const std::map\< std::string, std::string > \&options\_)</td>
      </tr>

      <tr className="memdesc:ac3ceb6b9b592b3bd68c8c6f872c9708d">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Constructs an <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest" title="A set of parameters for GPUdb::executeSql.">ExecuteSqlRequest</a> object with the specified parameters. <br /></td>
      </tr>

      <tr className="separator:ac3ceb6b9b592b3bd68c8c6f872c9708d">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>
    </table>

    <table className="memberdecls">
      <tr className="heading">
        <td colSpan="2">
          <h2 className="groupheader"> Public Attributes</h2>
        </td>
      </tr>

      <tr className="memitem:ad8b660473874fb465d1c69677edc191c" id="r_ad8b660473874fb465d1c69677edc191c">
        <td className="memItemLeft" align="right" valign="top">std::string </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#ad8b660473874fb465d1c69677edc191c">statement</a></td>
      </tr>

      <tr className="memdesc:ad8b660473874fb465d1c69677edc191c">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">SQL statement (query, DML, or DDL) to be executed. <br /></td>
      </tr>

      <tr className="separator:ad8b660473874fb465d1c69677edc191c">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:a8028935e70224cefd72f7fa79b0ef7de" id="r_a8028935e70224cefd72f7fa79b0ef7de">
        <td className="memItemLeft" align="right" valign="top">int64\_t </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a8028935e70224cefd72f7fa79b0ef7de">offset</a></td>
      </tr>

      <tr className="memdesc:a8028935e70224cefd72f7fa79b0ef7de">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). <br /></td>
      </tr>

      <tr className="separator:a8028935e70224cefd72f7fa79b0ef7de">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:a3613f778b8f80448019e49f740ef09af" id="r_a3613f778b8f80448019e49f740ef09af">
        <td className="memItemLeft" align="right" valign="top">int64\_t </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a3613f778b8f80448019e49f740ef09af">limit</a></td>
      </tr>

      <tr className="memdesc:a3613f778b8f80448019e49f740ef09af">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. <br /></td>
      </tr>

      <tr className="separator:a3613f778b8f80448019e49f740ef09af">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:a128652bab94e47f05891724d30ce0c19" id="r_a128652bab94e47f05891724d30ce0c19">
        <td className="memItemLeft" align="right" valign="top">std::string </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a128652bab94e47f05891724d30ce0c19">encoding</a></td>
      </tr>

      <tr className="memdesc:a128652bab94e47f05891724d30ce0c19">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Specifies the encoding for returned records; either 'binary' or 'json'. <br /></td>
      </tr>

      <tr className="separator:a128652bab94e47f05891724d30ce0c19">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:a6e66690d2ff950f40cf259dffaca6d68" id="r_a6e66690d2ff950f40cf259dffaca6d68">
        <td className="memItemLeft" align="right" valign="top">std::string </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a6e66690d2ff950f40cf259dffaca6d68">requestSchemaStr</a></td>
      </tr>

      <tr className="memdesc:a6e66690d2ff950f40cf259dffaca6d68">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Avro schema of <a className="el" href="#abbfac43fa48a606ad1d0019f4c8fbbed">data</a>. <br /></td>
      </tr>

      <tr className="separator:a6e66690d2ff950f40cf259dffaca6d68">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:abbfac43fa48a606ad1d0019f4c8fbbed" id="r_abbfac43fa48a606ad1d0019f4c8fbbed">
        <td className="memItemLeft" align="right" valign="top">std::vector\< std::vector\< uint8\_t > > </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#abbfac43fa48a606ad1d0019f4c8fbbed">data</a></td>
      </tr>

      <tr className="memdesc:abbfac43fa48a606ad1d0019f4c8fbbed">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">An array of binary-encoded data for the records to be binded to the SQL query. <br /></td>
      </tr>

      <tr className="separator:abbfac43fa48a606ad1d0019f4c8fbbed">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:a3047e9a4ca1490f2464e3f79129f8f11" id="r_a3047e9a4ca1490f2464e3f79129f8f11">
        <td className="memItemLeft" align="right" valign="top">std::map\< std::string, std::string > </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a3047e9a4ca1490f2464e3f79129f8f11">options</a></td>
      </tr>

      <tr className="memdesc:a3047e9a4ca1490f2464e3f79129f8f11">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Optional parameters. <br /></td>
      </tr>

      <tr className="separator:a3047e9a4ca1490f2464e3f79129f8f11">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>
    </table>

    <h2 className="groupheader">Detailed Description</h2>

    <div className="textblock">
      <p>A set of parameters for <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a6b771232d18e050420781df48d656cf1">GPUdb::executeSql</a>. </p>
      <p>Execute a SQL statement (query, DML, or DDL).</p>
      <p>See <a href="/content/sql/" target="_top">SQL Support</a> for the complete set of supported SQL commands.</p>
      <p>When a caller wants all the results from a large query (e.g., more than <a href="/content/config/#config-main-general" target="_top">max\_get\_records\_size</a> records), they can make multiple calls to this endpoint using the <a className="el" href="#a8028935e70224cefd72f7fa79b0ef7de">offset</a> and <a className="el" href="#a3613f778b8f80448019e49f740ef09af">limit</a> parameters to page through the results. Normally, this will execute the <a className="el" href="#ad8b660473874fb465d1c69677edc191c">statement</a> query each time. To avoid re-executing the query each time and to keep the results in the same order, the caller should specify a <a className="el" href="/content/api/cpp/namespacegpudb#a1cf02bf6e63569a04fd02f393fc3d8a5">paging\_table</a> name to hold the results of the query between calls and specify the <a className="el" href="/content/api/cpp/namespacegpudb#a1cf02bf6e63569a04fd02f393fc3d8a5">paging\_table</a> on subsequent calls. When this is done, the caller should clear the paging table and any other tables in the <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a> (both returned in the response) when they are done paging through the results. <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#a7513cc3b1e3c45335088094e006cdd32">pagingTable</a> (and <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a>) will be empty if no paging table was created (e.g., when all the query results were returned in the first call). </p>
      <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00041">41</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
    </div>

    <h2 className="groupheader">Constructor & Destructor Documentation</h2>
    <h2 className="memtitle"><span className="permalink"><a href="#a9d3aa3fde70c4ab3488724f2ba856899">◆ </a></span>ExecuteSqlRequest() <span className="overload">\[1/3]</span></h2>

    <div className="memitem">
      <div className="memproto">
        <table className="mlabels">
          <tr>
            <td className="mlabels-left">
              <table className="memname">
                <tr>
                  <td className="memname">gpudb::ExecuteSqlRequest::ExecuteSqlRequest </td>
                  <td>(</td>

                  <td className="paramname">
                    <span className="paramname">
                      <span className="em" />
                    </span>
                  </td>

                  <td>)</td>

                  <td />
                </tr>
              </table>
            </td>

            <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Constructs an <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest" title="A set of parameters for GPUdb::executeSql.">ExecuteSqlRequest</a> object with default parameters. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00046">46</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a8d3bedab001656623233f7d2e5801df1">◆ </a></span>ExecuteSqlRequest() <span className="overload">\[2/3]</span></h2>

    <div className="memitem">
      <div className="memproto">
        <table className="mlabels">
          <tr>
            <td className="mlabels-left">
              <table className="memname">
                <tr>
                  <td className="memname">gpudb::ExecuteSqlRequest::ExecuteSqlRequest </td>
                  <td>(</td>
                  <td className="paramtype">const std::string &</td>
                  <td className="paramname"><span className="paramname"><span className="em">statement\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const int64\_t</td>
                  <td className="paramname"><span className="paramname"><span className="em">offset\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const int64\_t</td>
                  <td className="paramname"><span className="paramname"><span className="em">limit\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::string &</td>
                  <td className="paramname"><span className="paramname"><span className="em">requestSchemaStr\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::vector\< std::vector\< uint8\_t > > &</td>
                  <td className="paramname"><span className="paramname"><span className="em">data\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::map\< std::string, std::string > &</td>
                  <td className="paramname"><span className="paramname"><span className="em">options\_</span></span> )</td>
                </tr>
              </table>
            </td>

            <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Constructs an <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest" title="A set of parameters for GPUdb::executeSql.">ExecuteSqlRequest</a> object with the specified parameters. </p>

        <div className="dl params">
          <div className="dt">Parameters</div>

          <div className="dd">
            <table className="params">
              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">statement\_</td>
                <td>SQL statement (query, DML, or DDL) to be executed. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">offset\_</td>
                <td>A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">limit\_</td>
                <td>A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server's own limit, defined by the <a href="/content/config/#config-main-general" target="_top">max\_get\_records\_size</a> parameter in the server configuration. Use <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#aa80498dd443e17627061c1a168f6beb5">hasMoreRecords</a> to see if more records exist in the result to be fetched, and <span className="em arg">offset\_</span> and <span className="em arg">limit\_</span> to request subsequent pages of results. The default value is -9999. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">requestSchemaStr\_</td>
                <td>Avro schema of <span className="em arg">data\_</span>. The default value is ''. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">data\_</td>
                <td>An array of binary-encoded data for the records to be binded to the SQL query. Or use <a className="el" href="/content/api/cpp/namespacegpudb#a6cebddfde5e6b4eae23d7439481cc964">query\_parameters</a> to pass the data in JSON format. The default value is an empty vector. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">options\_</td>

                <td>
                  Optional parameters.

                  <ul>
                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#add12bc9ed427fb67fa019456bad0362e">execute\_sql\_cost\_based\_optimization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables the cost-based optimization of the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#ac8b94984d1229e7f667e62ab8fd8ad71">execute\_sql\_distributed\_joins</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, enables the use of distributed joins in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a686c3e25bee2b4412d027033e38c81f4">execute\_sql\_distributed\_operations</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, enables the use of distributed operations in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#ad6546877f9753c4114969b2d94f8dd9a">execute\_sql\_ignore\_existing\_pk</a>: Specifies the record collision error-suppression policy for inserting into or updating a table with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>, only used when primary key record collisions are rejected (<a className="el" href="/content/api/cpp/namespacegpudb#a30c0b01a1047cb0225f07457e78ca64c">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>). If set to <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, any record insert/update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, the rejection of any insert/update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if <a className="el" href="/content/api/cpp/namespacegpudb#a30c0b01a1047cb0225f07457e78ca64c">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, then this option has no effect. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>: Ignore inserts/updates that result in primary key collisions with existing records. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>: Treat as errors any inserts/updates that result in primary key collisions with existing records. </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#ad57b7d5174c1ddb727c7efae60854bb4">execute\_sql\_late\_materialization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, Joins/Filters results will always be materialized ( saved to result tables format). Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1cf02bf6e63569a04fd02f393fc3d8a5">execute\_sql\_paging\_table</a>: When specified (or <a className="el" href="/content/api/cpp/namespacegpudb#aebc695a095422e03e1841710d053b2d6">paging\_table\_ttl</a> is set), the system will create a paging table to hold the results of the query, when the output has more records than are in the response (i.e., when <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#aa80498dd443e17627061c1a168f6beb5">hasMoreRecords</a> is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>). If the specified paging table exists, the records from the paging table are returned without re-evaluating the query. It is the caller's responsibility to clear the <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#a7513cc3b1e3c45335088094e006cdd32">pagingTable</a> and other tables in the <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a> (both returned in the response) when they are done with this query. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#aebc695a095422e03e1841710d053b2d6">execute\_sql\_paging\_table\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the paging table. -1 indicates no timeout. Setting this option will cause a paging table to be generated when needed. The <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#a7513cc3b1e3c45335088094e006cdd32">pagingTable</a> and other tables in the <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a> (both returned in the response) will be automatically cleared after the TTL expires, if set to a positive number. However, it is still recommended that the caller clear these tables when they are done with this query. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a623845fe2315e9b3270c3fbc4b80f3f7">execute\_sql\_parallel\_execution</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables the parallel step execution of the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#accf48a72173163513f8408aba8cfb630">execute\_sql\_plan\_cache</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables plan caching for the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a4a4a569be3468701eb3d9b40262ec7d9">execute\_sql\_prepare\_mode</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, compiles a query into an execution plan and saves it in query cache. Query execution is not performed and an empty response will be returned to user. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a43ab163a68e19752f1338aa455d62e16">execute\_sql\_preserve\_dict\_encoding</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, then columns that were dict encoded in the source table will be dict encoded in the projection table. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a6cebddfde5e6b4eae23d7439481cc964">execute\_sql\_query\_parameters</a>: Query parameters in JSON array or arrays (for inserting multiple rows). This can be used instead of <span className="em arg">data\_</span> and <span className="em arg">requestSchemaStr\_</span>. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a3cf19d3e30a5269942076228b801c5f8">execute\_sql\_results\_caching</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables caching of the results of the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a810e1cdd3a0cfe3b9617992467d3a770">execute\_sql\_rule\_based\_optimization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables rule-based rewrite optimizations for the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#abde7073e02def638c2cafea0bab6a864">execute\_sql\_ssq\_optimization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, scalar subqueries will be translated into joins. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab1f6ae0a2e616537fcee63d866d37f53">execute\_sql\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the intermediate result tables used in query execution. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a30c0b01a1047cb0225f07457e78ca64c">execute\_sql\_update\_on\_existing\_pk</a>: Specifies the record collision policy for inserting into or updating a table with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>. If set to <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, any existing table record with primary key values that match those of a record being inserted or updated will be replaced by that record. If set to <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, any such primary key collision will result in the insert/update being rejected and the error handled as determined by <a className="el" href="/content/api/cpp/namespacegpudb#ad6546877f9753c4114969b2d94f8dd9a">ignore\_existing\_pk</a>. If the specified table does not have a primary key, then this option has no effect. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>: Replace the collided-into record with the record inserted or updated when a new/modified record causes a primary key collision with an existing record. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>: Reject the insert or update when it results in a primary key collision with an existing record. </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#acda2b32fea85bcfc9cbf7d6cb8d63a80">execute\_sql\_validate\_change\_column</a>: When changing a column using alter table, validate the change before applying it. If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, then validate all values. A value too large (or too long) for the new type will prevent any change. If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, then when a value is too large or long, it will be truncated. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#aedc8372fe393566dbee53f39a912c2ee">execute\_sql\_current\_schema</a>: Use the supplied value as the <a href="/content/concepts/schemas/#default-schema" target="_top">default schema</a> when processing this SQL command. </li>
                  </ul>

                  The default value is an empty map.
                </td>
              </tr>
            </table>
          </div>
        </div>

        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00453">453</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#ac3ceb6b9b592b3bd68c8c6f872c9708d">◆ </a></span>ExecuteSqlRequest() <span className="overload">\[3/3]</span></h2>

    <div className="memitem">
      <div className="memproto">
        <table className="mlabels">
          <tr>
            <td className="mlabels-left">
              <table className="memname">
                <tr>
                  <td className="memname">gpudb::ExecuteSqlRequest::ExecuteSqlRequest </td>
                  <td>(</td>
                  <td className="paramtype">const std::string &</td>
                  <td className="paramname"><span className="paramname"><span className="em">statement\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const int64\_t</td>
                  <td className="paramname"><span className="paramname"><span className="em">offset\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const int64\_t</td>
                  <td className="paramname"><span className="paramname"><span className="em">limit\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::string &</td>
                  <td className="paramname"><span className="paramname"><span className="em">encoding\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::string &</td>
                  <td className="paramname"><span className="paramname"><span className="em">requestSchemaStr\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::vector\< std::vector\< uint8\_t > > &</td>
                  <td className="paramname"><span className="paramname"><span className="em">data\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::map\< std::string, std::string > &</td>
                  <td className="paramname"><span className="paramname"><span className="em">options\_</span></span> )</td>
                </tr>
              </table>
            </td>

            <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Constructs an <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest" title="A set of parameters for GPUdb::executeSql.">ExecuteSqlRequest</a> object with the specified parameters. </p>

        <div className="dl params">
          <div className="dt">Parameters</div>

          <div className="dd">
            <table className="params">
              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">statement\_</td>
                <td>SQL statement (query, DML, or DDL) to be executed. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">offset\_</td>
                <td>A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">limit\_</td>
                <td>A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server's own limit, defined by the <a href="/content/config/#config-main-general" target="_top">max\_get\_records\_size</a> parameter in the server configuration. Use <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#aa80498dd443e17627061c1a168f6beb5">hasMoreRecords</a> to see if more records exist in the result to be fetched, and <span className="em arg">offset\_</span> and <span className="em arg">limit\_</span> to request subsequent pages of results. The default value is -9999. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">encoding\_</td>

                <td>
                  Specifies the encoding for returned records; either 'binary' or 'json'. Supported values:

                  <ul>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5bbf9404a9dd23cb3513eba2d2089333">execute\_sql\_binary</a> </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3162c6d7757eebe86189f4409d0279bb">execute\_sql\_json</a> </li>
                  </ul>

                  The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a5bbf9404a9dd23cb3513eba2d2089333">execute\_sql\_binary</a>.
                </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">requestSchemaStr\_</td>
                <td>Avro schema of <span className="em arg">data\_</span>. The default value is ''. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">data\_</td>
                <td>An array of binary-encoded data for the records to be binded to the SQL query. Or use <a className="el" href="/content/api/cpp/namespacegpudb#a6cebddfde5e6b4eae23d7439481cc964">query\_parameters</a> to pass the data in JSON format. The default value is an empty vector. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">options\_</td>

                <td>
                  Optional parameters.

                  <ul>
                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#add12bc9ed427fb67fa019456bad0362e">execute\_sql\_cost\_based\_optimization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables the cost-based optimization of the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#ac8b94984d1229e7f667e62ab8fd8ad71">execute\_sql\_distributed\_joins</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, enables the use of distributed joins in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a686c3e25bee2b4412d027033e38c81f4">execute\_sql\_distributed\_operations</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, enables the use of distributed operations in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#ad6546877f9753c4114969b2d94f8dd9a">execute\_sql\_ignore\_existing\_pk</a>: Specifies the record collision error-suppression policy for inserting into or updating a table with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>, only used when primary key record collisions are rejected (<a className="el" href="/content/api/cpp/namespacegpudb#a30c0b01a1047cb0225f07457e78ca64c">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>). If set to <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, any record insert/update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, the rejection of any insert/update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if <a className="el" href="/content/api/cpp/namespacegpudb#a30c0b01a1047cb0225f07457e78ca64c">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, then this option has no effect. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>: Ignore inserts/updates that result in primary key collisions with existing records. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>: Treat as errors any inserts/updates that result in primary key collisions with existing records. </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#ad57b7d5174c1ddb727c7efae60854bb4">execute\_sql\_late\_materialization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, Joins/Filters results will always be materialized ( saved to result tables format). Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1cf02bf6e63569a04fd02f393fc3d8a5">execute\_sql\_paging\_table</a>: When specified (or <a className="el" href="/content/api/cpp/namespacegpudb#aebc695a095422e03e1841710d053b2d6">paging\_table\_ttl</a> is set), the system will create a paging table to hold the results of the query, when the output has more records than are in the response (i.e., when <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#aa80498dd443e17627061c1a168f6beb5">hasMoreRecords</a> is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>). If the specified paging table exists, the records from the paging table are returned without re-evaluating the query. It is the caller's responsibility to clear the <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#a7513cc3b1e3c45335088094e006cdd32">pagingTable</a> and other tables in the <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a> (both returned in the response) when they are done with this query. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#aebc695a095422e03e1841710d053b2d6">execute\_sql\_paging\_table\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the paging table. -1 indicates no timeout. Setting this option will cause a paging table to be generated when needed. The <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#a7513cc3b1e3c45335088094e006cdd32">pagingTable</a> and other tables in the <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a> (both returned in the response) will be automatically cleared after the TTL expires, if set to a positive number. However, it is still recommended that the caller clear these tables when they are done with this query. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a623845fe2315e9b3270c3fbc4b80f3f7">execute\_sql\_parallel\_execution</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables the parallel step execution of the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#accf48a72173163513f8408aba8cfb630">execute\_sql\_plan\_cache</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables plan caching for the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a4a4a569be3468701eb3d9b40262ec7d9">execute\_sql\_prepare\_mode</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, compiles a query into an execution plan and saves it in query cache. Query execution is not performed and an empty response will be returned to user. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a43ab163a68e19752f1338aa455d62e16">execute\_sql\_preserve\_dict\_encoding</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, then columns that were dict encoded in the source table will be dict encoded in the projection table. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a6cebddfde5e6b4eae23d7439481cc964">execute\_sql\_query\_parameters</a>: Query parameters in JSON array or arrays (for inserting multiple rows). This can be used instead of <span className="em arg">data\_</span> and <span className="em arg">requestSchemaStr\_</span>. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a3cf19d3e30a5269942076228b801c5f8">execute\_sql\_results\_caching</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables caching of the results of the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a810e1cdd3a0cfe3b9617992467d3a770">execute\_sql\_rule\_based\_optimization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables rule-based rewrite optimizations for the given query. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#abde7073e02def638c2cafea0bab6a864">execute\_sql\_ssq\_optimization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, scalar subqueries will be translated into joins. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab1f6ae0a2e616537fcee63d866d37f53">execute\_sql\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the intermediate result tables used in query execution. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a30c0b01a1047cb0225f07457e78ca64c">execute\_sql\_update\_on\_existing\_pk</a>: Specifies the record collision policy for inserting into or updating a table with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>. If set to <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, any existing table record with primary key values that match those of a record being inserted or updated will be replaced by that record. If set to <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, any such primary key collision will result in the insert/update being rejected and the error handled as determined by <a className="el" href="/content/api/cpp/namespacegpudb#ad6546877f9753c4114969b2d94f8dd9a">ignore\_existing\_pk</a>. If the specified table does not have a primary key, then this option has no effect. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>: Replace the collided-into record with the record inserted or updated when a new/modified record causes a primary key collision with an existing record. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>: Reject the insert or update when it results in a primary key collision with an existing record. </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#acda2b32fea85bcfc9cbf7d6cb8d63a80">execute\_sql\_validate\_change\_column</a>: When changing a column using alter table, validate the change before applying it. If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, then validate all values. A value too large (or too long) for the new type will prevent any change. If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, then when a value is too large or long, it will be truncated. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#aedc8372fe393566dbee53f39a912c2ee">execute\_sql\_current\_schema</a>: Use the supplied value as the <a href="/content/concepts/schemas/#default-schema" target="_top">default schema</a> when processing this SQL command. </li>
                  </ul>

                  The default value is an empty map.
                </td>
              </tr>
            </table>
          </div>
        </div>

        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00872">872</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <h2 className="groupheader">Member Data Documentation</h2>
    <h2 className="memtitle"><span className="permalink"><a href="#abbfac43fa48a606ad1d0019f4c8fbbed">◆ </a></span>data</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::vector\<std::vector\<uint8\_t> > gpudb::ExecuteSqlRequest::data</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>An array of binary-encoded data for the records to be binded to the SQL query. </p>
        <p>Or use <a className="el" href="/content/api/cpp/namespacegpudb#a6cebddfde5e6b4eae23d7439481cc964">query\_parameters</a> to pass the data in JSON format. The default value is an empty vector. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00934">934</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a128652bab94e47f05891724d30ce0c19">◆ </a></span>encoding</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::string gpudb::ExecuteSqlRequest::encoding</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Specifies the encoding for returned records; either 'binary' or 'json'. </p>
        <p>Supported values: </p>

        <ul>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5bbf9404a9dd23cb3513eba2d2089333">execute\_sql\_binary</a> </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3162c6d7757eebe86189f4409d0279bb">execute\_sql\_json</a> </li>
        </ul>

        <p>The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a5bbf9404a9dd23cb3513eba2d2089333">execute\_sql\_binary</a>. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00921">921</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a3613f778b8f80448019e49f740ef09af">◆ </a></span>limit</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">int64\_t gpudb::ExecuteSqlRequest::limit</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. </p>
        <p>The number of records returned will never exceed the server's own limit, defined by the <a href="/content/config/#config-main-general" target="_top">max\_get\_records\_size</a> parameter in the server configuration. Use <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#aa80498dd443e17627061c1a168f6beb5">hasMoreRecords</a> to see if more records exist in the result to be fetched, and <a className="el" href="#a8028935e70224cefd72f7fa79b0ef7de">offset</a> and <a className="el" href="#a3613f778b8f80448019e49f740ef09af">limit</a> to request subsequent pages of results. The default value is -9999. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00908">908</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a8028935e70224cefd72f7fa79b0ef7de">◆ </a></span>offset</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">int64\_t gpudb::ExecuteSqlRequest::offset</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). </p>
        <p>The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00894">894</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a3047e9a4ca1490f2464e3f79129f8f11">◆ </a></span>options</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::map\<std::string, std::string> gpudb::ExecuteSqlRequest::options</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Optional parameters. </p>

        <ul>
          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#add12bc9ed427fb67fa019456bad0362e">execute\_sql\_cost\_based\_optimization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables the cost-based optimization of the given query. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#ac8b94984d1229e7f667e62ab8fd8ad71">execute\_sql\_distributed\_joins</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, enables the use of distributed joins in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a686c3e25bee2b4412d027033e38c81f4">execute\_sql\_distributed\_operations</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, enables the use of distributed operations in servicing the given query. Any query requiring a distributed join will succeed, though hints can be used in the query to change the distribution of the source data to allow the query to succeed. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#ad6546877f9753c4114969b2d94f8dd9a">execute\_sql\_ignore\_existing\_pk</a>: Specifies the record collision error-suppression policy for inserting into or updating a table with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>, only used when primary key record collisions are rejected (<a className="el" href="/content/api/cpp/namespacegpudb#a30c0b01a1047cb0225f07457e78ca64c">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>). If set to <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, any record insert/update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, the rejection of any insert/update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if <a className="el" href="/content/api/cpp/namespacegpudb#a30c0b01a1047cb0225f07457e78ca64c">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, then this option has no effect. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>: Ignore inserts/updates that result in primary key collisions with existing records. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>: Treat as errors any inserts/updates that result in primary key collisions with existing records. </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#ad57b7d5174c1ddb727c7efae60854bb4">execute\_sql\_late\_materialization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, Joins/Filters results will always be materialized ( saved to result tables format). Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
          </li>

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1cf02bf6e63569a04fd02f393fc3d8a5">execute\_sql\_paging\_table</a>: When specified (or <a className="el" href="/content/api/cpp/namespacegpudb#aebc695a095422e03e1841710d053b2d6">paging\_table\_ttl</a> is set), the system will create a paging table to hold the results of the query, when the output has more records than are in the response (i.e., when <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#aa80498dd443e17627061c1a168f6beb5">hasMoreRecords</a> is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>). If the specified paging table exists, the records from the paging table are returned without re-evaluating the query. It is the caller's responsibility to clear the <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#a7513cc3b1e3c45335088094e006cdd32">pagingTable</a> and other tables in the <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a> (both returned in the response) when they are done with this query. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#aebc695a095422e03e1841710d053b2d6">execute\_sql\_paging\_table\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the paging table. -1 indicates no timeout. Setting this option will cause a paging table to be generated when needed. The <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#a7513cc3b1e3c45335088094e006cdd32">pagingTable</a> and other tables in the <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a> (both returned in the response) will be automatically cleared after the TTL expires, if set to a positive number. However, it is still recommended that the caller clear these tables when they are done with this query. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a623845fe2315e9b3270c3fbc4b80f3f7">execute\_sql\_parallel\_execution</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables the parallel step execution of the given query. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#accf48a72173163513f8408aba8cfb630">execute\_sql\_plan\_cache</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables plan caching for the given query. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a4a4a569be3468701eb3d9b40262ec7d9">execute\_sql\_prepare\_mode</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, compiles a query into an execution plan and saves it in query cache. Query execution is not performed and an empty response will be returned to user. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a43ab163a68e19752f1338aa455d62e16">execute\_sql\_preserve\_dict\_encoding</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, then columns that were dict encoded in the source table will be dict encoded in the projection table. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
          </li>

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a6cebddfde5e6b4eae23d7439481cc964">execute\_sql\_query\_parameters</a>: Query parameters in JSON array or arrays (for inserting multiple rows). This can be used instead of <a className="el" href="#abbfac43fa48a606ad1d0019f4c8fbbed">data</a> and <a className="el" href="#a6e66690d2ff950f40cf259dffaca6d68">requestSchemaStr</a>. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a3cf19d3e30a5269942076228b801c5f8">execute\_sql\_results\_caching</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables caching of the results of the given query. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a810e1cdd3a0cfe3b9617992467d3a770">execute\_sql\_rule\_based\_optimization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, disables rule-based rewrite optimizations for the given query. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#abde7073e02def638c2cafea0bab6a864">execute\_sql\_ssq\_optimization</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, scalar subqueries will be translated into joins. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
          </li>

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab1f6ae0a2e616537fcee63d866d37f53">execute\_sql\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the intermediate result tables used in query execution. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a30c0b01a1047cb0225f07457e78ca64c">execute\_sql\_update\_on\_existing\_pk</a>: Specifies the record collision policy for inserting into or updating a table with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>. If set to <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, any existing table record with primary key values that match those of a record being inserted or updated will be replaced by that record. If set to <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, any such primary key collision will result in the insert/update being rejected and the error handled as determined by <a className="el" href="/content/api/cpp/namespacegpudb#ad6546877f9753c4114969b2d94f8dd9a">ignore\_existing\_pk</a>. If the specified table does not have a primary key, then this option has no effect. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>: Replace the collided-into record with the record inserted or updated when a new/modified record causes a primary key collision with an existing record. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>: Reject the insert or update when it results in a primary key collision with an existing record. </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#acda2b32fea85bcfc9cbf7d6cb8d63a80">execute\_sql\_validate\_change\_column</a>: When changing a column using alter table, validate the change before applying it. If <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">true</a>, then validate all values. A value too large (or too long) for the new type will prevent any change. If <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">false</a>, then when a value is too large or long, it will be truncated. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a56694eafed65a54cf067f2cc44df1017">execute\_sql\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ad0528036a98d995c38e3c55b0cd52d08">execute\_sql\_true</a>.
          </li>

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#aedc8372fe393566dbee53f39a912c2ee">execute\_sql\_current\_schema</a>: Use the supplied value as the <a href="/content/concepts/schemas/#default-schema" target="_top">default schema</a> when processing this SQL command. </li>
        </ul>

        <p>The default value is an empty map. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l01183">1183</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a6e66690d2ff950f40cf259dffaca6d68">◆ </a></span>requestSchemaStr</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::string gpudb::ExecuteSqlRequest::requestSchemaStr</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Avro schema of <a className="el" href="#abbfac43fa48a606ad1d0019f4c8fbbed">data</a>. </p>
        <p>The default value is ''. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00926">926</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#ad8b660473874fb465d1c69677edc191c">◆ </a></span>statement</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::string gpudb::ExecuteSqlRequest::statement</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>SQL statement (query, DML, or DDL) to be executed. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/execute__sql_8h_source#l00886">886</a> of file <a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a>.</p>
      </div>
    </div>

    <hr />

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

    <ul>
      <li>gpudb/protocol/<a className="el" href="/content/api/cpp/execute__sql_8h_source">execute\_sql.h</a></li>
    </ul>
  </div>
</div>
