forked from heavyai/heavydb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMetaClientContext.h
70 lines (64 loc) · 1.95 KB
/
MetaClientContext.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef METACLIENTCONTEXT_H
#define METACLIENTCONTEXT_H
#include "gen-cpp/omnisci_types.h"
using namespace ::apache::thrift;
using namespace ::apache::thrift::protocol;
using namespace ::apache::thrift::transport;
static std::string const INVALID_SESSION_ID("");
static std::string const OMNISCI_ROOT_USER("admin");
static std::string const OMNISCI_DEFAULT_ROOT_USER_ROLE("omnisci_default_suser_role");
template <typename CLIENT_TYPE, typename TRANSPORT_TYPE>
struct MetaClientContext {
std::string user_name;
std::string passwd;
std::string db_name;
std::string server_host;
int port;
bool http;
bool https;
bool skip_host_verify;
TRANSPORT_TYPE transport;
CLIENT_TYPE client;
TSessionId session;
TQueryResult query_return;
std::vector<std::string> names_return;
std::vector<TDBInfo> dbinfos_return;
TExecuteMode::type execution_mode;
std::string version;
std::vector<TNodeMemoryInfo> gpu_memory;
std::vector<TNodeMemoryInfo> cpu_memory;
TTableDetails table_details;
std::string table_name;
std::string file_name;
TCopyParams copy_params;
int db_id;
int table_id;
int epoch_value;
TServerStatus server_status;
TClusterHardwareInfo cluster_hardware_info;
std::vector<TServerStatus> cluster_status;
std::string view_name;
std::string dashboard_owner;
int dash_id;
std::string view_state;
std::string view_metadata;
TDashboard dash_return;
std::string privs_role_name;
std::string privs_user_name;
std::string privs_object_name;
std::vector<std::string> role_names;
std::vector<TDBObject> db_objects;
TDBObjectType::type object_type;
std::string license_key;
TLicenseInfo license_info;
std::vector<TCompletionHint> completion_hints;
std::vector<TDashboard> dash_names;
TSessionInfo session_info;
MetaClientContext(TTransport& t, CLIENT_TYPE& c)
: transport(t)
, client(c)
, session(INVALID_SESSION_ID)
, execution_mode(TExecuteMode::GPU) {}
MetaClientContext() {}
};
#endif