暂时添加了 邮箱不可重复申请帐号
后续改成 邮箱可以申请多个账号, 用邮箱登陆时选择帐号登陆 修改了 MessageSystem 结构
This commit is contained in:
32
MessageSystem/message_base/db_base.h
Normal file
32
MessageSystem/message_base/db_base.h
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// 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
|
||||
Reference in New Issue
Block a user