dongl a764f9fcab 暂时添加了 邮箱不可重复申请帐号
后续改成 邮箱可以申请多个账号, 用邮箱登陆时选择帐号登陆
修改了 MessageSystem 结构
2023-07-04 10:31:14 +08:00

33 lines
675 B
C++

//
// Created by dongl on 23-5-29.
//
#ifndef IM2_DB_BASE_H
#define IM2_DB_BASE_H
#include <mongocxx/pool.hpp>
#include <mongocxx/stdx.hpp>
#include <bsoncxx/stdx/optional.hpp>
#include <mongocxx/client.hpp>
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_array;
using bsoncxx::builder::basic::make_document;
class db_base {
public:
db_base();
mongocxx::pool::entry acquire();
bsoncxx::stdx::optional<mongocxx::pool::entry> try_acquire();
public:
// 命中 库 表
mongocxx::collection hit_db_coll(const std::string& db_name, const std::string& coll);
private:
mongocxx::pool* pool = nullptr;
};
#endif //IM2_DB_BASE_H