GPUdb C++ API  Version 7.2.2.4
gpudb::ExecuteSqlRequest Struct Reference

A set of parameters for GPUdb::executeSql. More...

#include <gpudb/protocol/execute_sql.h>

Public Member Functions

 ExecuteSqlRequest ()
 Constructs an ExecuteSqlRequest object with default parameters. More...
 
 ExecuteSqlRequest (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_)
 Constructs an ExecuteSqlRequest object with the specified parameters. More...
 
 ExecuteSqlRequest (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_)
 Constructs an ExecuteSqlRequest object with the specified parameters. More...
 

Public Attributes

std::string statement
 SQL statement (query, DML, or DDL) to be executed. More...
 
int64_t offset
 A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). More...
 
int64_t limit
 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. More...
 
std::string encoding
 Specifies the encoding for returned records; either 'binary' or 'json'. More...
 
std::string requestSchemaStr
 Avro schema of data. More...
 
std::vector< std::vector< uint8_t > > data
 An array of binary-encoded data for the records to be binded to the SQL query. More...
 
std::map< std::string, std::string > options
 Optional parameters. More...
 

Detailed Description

A set of parameters for GPUdb::executeSql.

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

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

Definition at line 22 of file execute_sql.h.

Constructor & Destructor Documentation

◆ ExecuteSqlRequest() [1/3]

gpudb::ExecuteSqlRequest::ExecuteSqlRequest ( )
inline

Constructs an ExecuteSqlRequest object with default parameters.

Definition at line 27 of file execute_sql.h.

◆ ExecuteSqlRequest() [2/3]

gpudb::ExecuteSqlRequest::ExecuteSqlRequest ( 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_ 
)
inline

Constructs an ExecuteSqlRequest object with the specified parameters.

Parameters
[in]statement_SQL statement (query, DML, or DDL) to be executed
[in]offset_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.
[in]limit_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 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_ & limit_ to request subsequent pages of results. The default value is -9999.
[in]requestSchemaStr_Avro schema of data_. The default value is ''.
[in]data_An 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]options_Optional parameters. The default value is an empty map.

Definition at line 405 of file execute_sql.h.

◆ ExecuteSqlRequest() [3/3]

gpudb::ExecuteSqlRequest::ExecuteSqlRequest ( 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_ 
)
inline

Constructs an ExecuteSqlRequest object with the specified parameters.

Parameters
[in]statement_SQL statement (query, DML, or DDL) to be executed
[in]offset_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.
[in]limit_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 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_ & limit_ to request subsequent pages of results. The default value is -9999.
[in]encoding_Specifies the encoding for returned records; either 'binary' or 'json'. Supported values: The default value is execute_sql_binary.
[in]requestSchemaStr_Avro schema of data_. The default value is ''.
[in]data_An 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]options_Optional parameters. The default value is an empty map.

Definition at line 795 of file execute_sql.h.

Member Data Documentation

◆ data

std::vector<std::vector<uint8_t> > gpudb::ExecuteSqlRequest::data

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

Definition at line 857 of file execute_sql.h.

◆ encoding

std::string gpudb::ExecuteSqlRequest::encoding

Specifies the encoding for returned records; either 'binary' or 'json'.

Supported values:

The default value is execute_sql_binary.

Definition at line 844 of file execute_sql.h.

◆ limit

int64_t gpudb::ExecuteSqlRequest::limit

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 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 & limit to request subsequent pages of results. The default value is -9999.

Definition at line 831 of file execute_sql.h.

◆ offset

int64_t gpudb::ExecuteSqlRequest::offset

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.

Definition at line 817 of file execute_sql.h.

◆ options

std::map<std::string, std::string> gpudb::ExecuteSqlRequest::options

Optional parameters.

The default value is an empty map.

Definition at line 1089 of file execute_sql.h.

◆ requestSchemaStr

std::string gpudb::ExecuteSqlRequest::requestSchemaStr

Avro schema of data.

The default value is ''.

Definition at line 849 of file execute_sql.h.

◆ statement

std::string gpudb::ExecuteSqlRequest::statement

SQL statement (query, DML, or DDL) to be executed.

Definition at line 809 of file execute_sql.h.


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