2 #include "../acl_cpp_define.hpp" 3 #include "../stdlib/string.hpp" 4 #include "../stdlib/noncopyable.hpp" 7 #if !defined(ACL_DB_DISABLE) 38 query& create(
const char* sql);
46 query& set_parameter(
const char*
name,
const char *value);
54 query& set_parameter(
const char*
name,
char value);
62 query& set_parameter(
const char*
name,
short value);
70 query& set_parameter(
const char*
name,
int value);
79 query& set_parameter(
const char*
name,
float value,
int precision = 8);
88 query& set_parameter(
const char*
name,
double value,
int precision = 8);
96 #if defined(_WIN32) || defined(_WIN64) 97 query& set_parameter(
const char*
name, __int64 value);
99 query& set_parameter(
const char*
name,
long long int value);
109 query& set_date(
const char*
name, time_t value,
110 const char*
fmt =
"%Y-%m-%d %H:%M:%S");
118 query& set_format(
const char*
name,
const char*
fmt, ...)
128 query& set_vformat(
const char*
name,
const char*
fmt, va_list ap);
134 const string& to_string();
149 static const string&
escape(
const char* in,
size_t len,
string& out);
159 static const char* to_date(time_t t,
string& out,
160 const char*
fmt =
"%Y-%m-%d %H:%M:%S");
191 std::map<string, query_param*> params_;
196 void del_param(
const string& key);
197 bool append_key(
string& buf,
char* key);
202 #endif // !defined(ACL_DB_DISABLE) HTTP_API void const char * name
#define ACL_CPP_PRINTF(format_idx, arg_idx)
ACL_API void const char * fmt
ACL_CPP_API void escape(const char *in, size_t len, string &out)