URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/lock/table
Manages global access to a table's data. By default a table has a input parameter lock_type of unlock, indicating all operations are permitted. A user may request a read-only or a write-only lock, after which only read or write operations, respectively, are permitted on the table until the lock is removed. When input parameter lock_type is disable then no operations are permitted on the table. The lock status can be queried by setting input parameter lock_type to status.
Input Parameter Description
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| table_name | string | Name of the table to be locked. It must be a currently existing table, collection, or view. | ||||||||||||
| lock_type | string | The type of lock being applied to the table. Setting it to status will return the current lock status of the table without changing it. Default value is 'status'. 
  | 
||||||||||||
| options | map of strings | Optional parameters. Default value is an empty map ( {} ). | 
Output Parameter Description
The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| status | String | 'OK' or 'ERROR' | ||||||
| message | String | Empty if success or an error message | ||||||
| data_type | String | 'lock_table_request' or 'none' in case of an error | ||||||
| data | String | Empty string | ||||||
| data_str | JSON or String | This embedded JSON represents the result of the /lock/table endpoint: 
 Empty string in case of an error.  |