> ## 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.

# lockTable

<div className="kinetica-doxygen">
  <div id="ae6ac44ea2b9603bbad231212560ab451" />

  <h2 className="memtitle"><span className="permalink"><a href="#ae6ac44ea2b9603bbad231212560ab451">◆ </a></span>lockTable() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">LockTableResponse</a> gpudb::GPUdb::lockTable </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest">LockTableRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Manages global access to a table's data. </p>
      <p>By default a table has a <a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest#ad0ceaa81ab3b5a95ec82e47f37cfb008">lockType</a> of <a className="el" href="/content/api/cpp/namespacegpudb#a3850006e51cb92262ee99c33e236be8e">read\_write</a>, indicating all operations are permitted. A user may request a <a className="el" href="/content/api/cpp/namespacegpudb#a13f9c3cae84296683c96fee7fc9d0559">read\_only</a> or a <a className="el" href="/content/api/cpp/namespacegpudb#a778a0ff86149e98e2801e79e77a9d808">write\_only</a> lock, after which only read or write operations, respectively, are permitted on the table until the lock is removed. When <a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest#ad0ceaa81ab3b5a95ec82e47f37cfb008">lockType</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a1765927f79afe041ba87edf363884e26">no\_access</a> then no operations are permitted on the table. The lock status can be queried by setting <a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest#ad0ceaa81ab3b5a95ec82e47f37cfb008">lockType</a> to <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">status</a>.</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">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a6f2620490cc2084a66dcfdad2ab3f65d" />

  <h2 className="memtitle"><span className="permalink"><a href="#a6f2620490cc2084a66dcfdad2ab3f65d">◆ </a></span>lockTable() <span className="overload">\[2/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">LockTableResponse</a> & gpudb::GPUdb::lockTable </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest">LockTableRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

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

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">LockTableResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Manages global access to a table's data. </p>
      <p>By default a table has a <a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest#ad0ceaa81ab3b5a95ec82e47f37cfb008">lockType</a> of <a className="el" href="/content/api/cpp/namespacegpudb#a3850006e51cb92262ee99c33e236be8e">read\_write</a>, indicating all operations are permitted. A user may request a <a className="el" href="/content/api/cpp/namespacegpudb#a13f9c3cae84296683c96fee7fc9d0559">read\_only</a> or a <a className="el" href="/content/api/cpp/namespacegpudb#a778a0ff86149e98e2801e79e77a9d808">write\_only</a> lock, after which only read or write operations, respectively, are permitted on the table until the lock is removed. When <a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest#ad0ceaa81ab3b5a95ec82e47f37cfb008">lockType</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a1765927f79afe041ba87edf363884e26">no\_access</a> then no operations are permitted on the table. The lock status can be queried by setting <a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest#ad0ceaa81ab3b5a95ec82e47f37cfb008">lockType</a> to <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">status</a>.</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">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a52f7405279172f1207c78fc5dae5b7ba" />

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

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">LockTableResponse</a> gpudb::GPUdb::lockTable </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</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">lockType</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> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Manages global access to a table's data. </p>
      <p>By default a table has a <span className="em arg">lockType</span> of <a className="el" href="/content/api/cpp/namespacegpudb#a3850006e51cb92262ee99c33e236be8e">read\_write</a>, indicating all operations are permitted. A user may request a <a className="el" href="/content/api/cpp/namespacegpudb#a13f9c3cae84296683c96fee7fc9d0559">read\_only</a> or a <a className="el" href="/content/api/cpp/namespacegpudb#a778a0ff86149e98e2801e79e77a9d808">write\_only</a> lock, after which only read or write operations, respectively, are permitted on the table until the lock is removed. When <span className="em arg">lockType</span> is <a className="el" href="/content/api/cpp/namespacegpudb#a1765927f79afe041ba87edf363884e26">no\_access</a> then no operations are permitted on the table. The lock status can be queried by setting <span className="em arg">lockType</span> to <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">status</a>.</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">tableName</td>
              <td>Name of the table to be locked, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. It must be a currently existing table or view. </td>
            </tr>

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

              <td>
                The type of lock being applied to the table. Setting it to <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">status</a> will return the current lock status of the table without changing it. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">lock\_table\_status</a>: Show locked status. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1765927f79afe041ba87edf363884e26">lock\_table\_no\_access</a>: Allow no read/write operations. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a13f9c3cae84296683c96fee7fc9d0559">lock\_table\_read\_only</a>: Allow only read operations. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a778a0ff86149e98e2801e79e77a9d808">lock\_table\_write\_only</a>: Allow only write operations. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3850006e51cb92262ee99c33e236be8e">lock\_table\_read\_write</a>: Allow all read/write operations. </li>
                </ul>

                The default value is <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">lock\_table\_status</a>.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>
              <td>Optional parameters. The default value is an empty map.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a91fbe8cf1b51394ad50fa063020d9e5a" />

  <h2 className="memtitle"><span className="permalink"><a href="#a91fbe8cf1b51394ad50fa063020d9e5a">◆ </a></span>lockTable() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">LockTableResponse</a> & gpudb::GPUdb::lockTable </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</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">lockType</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>

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

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">LockTableResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Manages global access to a table's data. </p>
      <p>By default a table has a <span className="em arg">lockType</span> of <a className="el" href="/content/api/cpp/namespacegpudb#a3850006e51cb92262ee99c33e236be8e">read\_write</a>, indicating all operations are permitted. A user may request a <a className="el" href="/content/api/cpp/namespacegpudb#a13f9c3cae84296683c96fee7fc9d0559">read\_only</a> or a <a className="el" href="/content/api/cpp/namespacegpudb#a778a0ff86149e98e2801e79e77a9d808">write\_only</a> lock, after which only read or write operations, respectively, are permitted on the table until the lock is removed. When <span className="em arg">lockType</span> is <a className="el" href="/content/api/cpp/namespacegpudb#a1765927f79afe041ba87edf363884e26">no\_access</a> then no operations are permitted on the table. The lock status can be queried by setting <span className="em arg">lockType</span> to <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">status</a>.</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">tableName</td>
              <td>Name of the table to be locked, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. It must be a currently existing table or view. </td>
            </tr>

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

              <td>
                The type of lock being applied to the table. Setting it to <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">status</a> will return the current lock status of the table without changing it. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">lock\_table\_status</a>: Show locked status. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1765927f79afe041ba87edf363884e26">lock\_table\_no\_access</a>: Allow no read/write operations. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a13f9c3cae84296683c96fee7fc9d0559">lock\_table\_read\_only</a>: Allow only read operations. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a778a0ff86149e98e2801e79e77a9d808">lock\_table\_write\_only</a>: Allow only write operations. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3850006e51cb92262ee99c33e236be8e">lock\_table\_read\_write</a>: Allow all read/write operations. </li>
                </ul>

                The default value is <a className="el" href="/content/api/cpp/namespacegpudb#aaea6e5cd5925eb2a89b9f638432e8055">lock\_table\_status</a>.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>
              <td>Optional parameters. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1LockTableResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
