2 #include "../acl_cpp_define.hpp" 5 #include "../stdlib/string.hpp" 6 #include "../stdlib/noncopyable.hpp" 7 #include "../stream/socket_stream.hpp" 8 #include "../hsocket/hsproto.hpp" 10 #ifndef ACL_CLIENT_ONLY 29 hsclient(
const char* addr,
bool cache_enable =
true,
bool retry_enable =
true);
44 const std::vector<hsrow*>& get(
const char* values[],
int num,
45 const char* cond =
"=",
int nlimit = 0,
int noffset = 0);
54 const std::vector<hsrow*>& get(
const char* first_value, ...)
72 bool mod(
const char* values[],
int num,
73 const char* to_values[],
int to_num,
74 const char* cond =
"=",
int nlimit = 0,
int noffset = 0);
88 bool del(
const char* values[],
int num,
const char* cond =
"=",
89 int nlimit = 0,
int noffset = 0);
108 bool add(
const char* values[],
int num);
123 void debug_enable(
bool on);
135 bool open_tbl(
const char* dbn,
const char* tbl,
136 const char* idx,
const char* flds,
bool auto_open =
true);
142 const char* get_addr()
const;
148 int get_error()
const;
155 const char* get_serror(
int errnum)
const;
161 const char* get_last_serror()
const;
179 std::map<string, hstable*> tables_;
186 bool open_tbl(
const char* dbn,
const char* tbl,
187 const char* idx,
const char* flds,
const char* key);
197 bool query(
const char* oper,
const char* values[],
int num,
198 const char* limit_offset,
char mop,
199 const char* to_values[],
int to_num);
205 #endif // ACL_CLIENT_ONLY #define ACL_CPP_PRINTF(format_idx, arg_idx)