The C++ DistributedSqlEngine Class

DistributedSqlEngine provides the client interface for distributed execution of SQL queries.

For an overview see page C++ Classes

DistributedSqlEngine inherits all public methods from base class SqlEngine; the principle methods are listed in the McoSqlEngine page. The additional specialized methods of DistributedSqlEngine are described in the table below.

DistributedSqlEngine(size_t txBufSize = 64 * 1024)) Constructor of the SQL engine remote interface. The parameter txBufSize specifies the size of transmit buffer used to serialize requests to be sent to the server (default is 64k)
bool open( parameter list ) Open the client SQL engine and connect to the server
close() Close the connection with the servers
isRemote() Check if engine is local or remote
bool getServerQueryStats(QueryStat &ret_stat);() Get last query statistics. Returns true if stats were collected and ret_stat received the stats; false if stats were not collected
void printQueryStat(FILE *out); Print the gathered statistics to a file
virtual void onReplicaConnectionFailure(int node, int errorCode); Handler of replica connection failure. Can be redefined in a derived class. By default it just writes a message in the log file.
virtual void onReplicaReconnect(int node); Handler of replica reconnect. Can be redefined in a derived class. By default it just writes a message in the log file.
DESTROY(DistributedSqlEngine) This macro generates the destructor to destroy the SQL engine remote interface