38 virtual bool nconnect(
const std::string& host,
const std::string& user,
39 const std::string& pswd,
const std::string& dbname,
40 unsigned int port = 9000)
override;
41 virtual bool close()
override;
42 virtual bool isConnection()
const override;
43 virtual bool ping()
const override;
45 virtual const std::string lastQuery()
override;
48 virtual DBResult query(
const std::string& q )
override;
51 const std::vector<clickhouse::Block> bquery(
const std::string& q );
53 bool execute(
const std::string& q );
54 bool insert(
const std::string& tblname,
const clickhouse::Block& data );
56 virtual const std::string error()
override;
58 bool reconnect(
const std::string& host,
const std::string& user,
59 const std::string& pswd,
const std::string& dbname,
60 unsigned int port = 9000);
62 void setOptions(
int sendRetries,
bool pingBeforeQuery );
65 virtual bool insert(
const std::string& q )
override
69 virtual double insert_id()
override
77 DBResult makeResult(
const clickhouse::Block& res );
78 void appendResult(
DBResult& ret,
const clickhouse::Block& block );
80 std::unique_ptr<clickhouse::Client> db;
84 int sendRetries = { 2 };
85 bool pingBeforeQuery = {
true };