Skip to main content

◆ executeSql() [1/4]

ExecuteSqlResponse gpudb::GPUdb::executeSql (const ExecuteSqlRequest &request_) const

Execute a SQL statement (query, DML, or DDL).

See SQL Support for the complete set of supported SQL commands.

When a caller wants all the results from a large query (e.g., more than max_get_records_size records), they can make multiple calls to this endpoint using the offset and limit parameters to page through the results. Normally, this will execute the statement 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 paging_table name to hold the results of the query between calls and specify the paging_table on subsequent calls. When this is done, the caller should clear the paging table and any other tables in the result_table_list (both returned in the response) when they are done paging through the results. pagingTable (and result_table_list) will be empty if no paging table was created (e.g., when all the query results were returned in the first call).

Parameters
[in]request_Request object containing the parameters for the operation.
Returns
Response object containing the result of the operation.

◆ executeSql() [2/4]

ExecuteSqlResponse & gpudb::GPUdb::executeSql (const ExecuteSqlRequest &request_,
ExecuteSqlResponse &response_ ) const

Execute a SQL statement (query, DML, or DDL).

See SQL Support for the complete set of supported SQL commands.

When a caller wants all the results from a large query (e.g., more than max_get_records_size records), they can make multiple calls to this endpoint using the offset and limit parameters to page through the results. Normally, this will execute the statement 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 paging_table name to hold the results of the query between calls and specify the paging_table on subsequent calls. When this is done, the caller should clear the paging table and any other tables in the result_table_list (both returned in the response) when they are done paging through the results. pagingTable (and result_table_list) will be empty if no paging table was created (e.g., when all the query results were returned in the first call).

Parameters
[in]request_Request object containing the parameters for the operation.
[out]response_Response object containing the results of the operation.
Returns
Response object containing the result of the operation (initially passed in by reference).

◆ executeSql() [3/4]

ExecuteSqlResponse gpudb::GPUdb::executeSql (const std::string &statement,
const int64_toffset,
const int64_tlimit,
const std::string &requestSchemaStr,
const std::vector< std::vector< uint8_t > > &data,
const std::map< std::string, std::string > &options ) const

Execute a SQL statement (query, DML, or DDL).

See SQL Support for the complete set of supported SQL commands.

When a caller wants all the results from a large query (e.g., more than max_get_records_size records), they can make multiple calls to this endpoint using the offset and limit parameters to page through the results. Normally, this will execute the statement 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 paging_table name to hold the results of the query between calls and specify the paging_table on subsequent calls. When this is done, the caller should clear the paging table and any other tables in the result_table_list (both returned in the response) when they are done paging through the results. pagingTable (and result_table_list) will be empty if no paging table was created (e.g., when all the query results were returned in the first call).

Parameters
[in]statementSQL statement (query, DML, or DDL) to be executed.
[in]offsetA 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.
[in]limitA 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 max_get_records_size parameter in the server configuration. Use hasMoreRecords to see if more records exist in the result to be fetched, and offset and limit to request subsequent pages of results. The default value is -9999.
[in]requestSchemaStrAvro schema of data. The default value is ”.
[in]dataAn array of binary-encoded data for the records to be binded to the SQL query. Or use query_parameters to pass the data in JSON format. The default value is an empty vector.
[in]optionsOptional parameters.The default value is an empty map.
Returns
Response object containing the result of the operation.

◆ executeSql() [4/4]

ExecuteSqlResponse & gpudb::GPUdb::executeSql (const std::string &statement,
const int64_toffset,
const int64_tlimit,
const std::string &requestSchemaStr,
const std::vector< std::vector< uint8_t > > &data,
const std::map< std::string, std::string > &options,
ExecuteSqlResponse &response_ ) const

Execute a SQL statement (query, DML, or DDL).

See SQL Support for the complete set of supported SQL commands.

When a caller wants all the results from a large query (e.g., more than max_get_records_size records), they can make multiple calls to this endpoint using the offset and limit parameters to page through the results. Normally, this will execute the statement 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 paging_table name to hold the results of the query between calls and specify the paging_table on subsequent calls. When this is done, the caller should clear the paging table and any other tables in the result_table_list (both returned in the response) when they are done paging through the results. pagingTable (and result_table_list) will be empty if no paging table was created (e.g., when all the query results were returned in the first call).

Parameters
[in]statementSQL statement (query, DML, or DDL) to be executed.
[in]offsetA 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.
[in]limitA 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 max_get_records_size parameter in the server configuration. Use hasMoreRecords to see if more records exist in the result to be fetched, and offset and limit to request subsequent pages of results. The default value is -9999.
[in]requestSchemaStrAvro schema of data. The default value is ”.
[in]dataAn array of binary-encoded data for the records to be binded to the SQL query. Or use query_parameters to pass the data in JSON format. The default value is an empty vector.
[in]optionsOptional parameters.The default value is an empty map.
[out]response_Response object containing the results of the operation.
Returns
Response object containing the result of the operation (initially passed in by reference).