ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::xarg_db Struct Reference

数据库配置结构体 More...

#include <xmlinfo.h>

Public Types

enum  edb { edb_mysql = 0 , edb_postgresql = 1 }
 数据库类型枚举 More...

Public Attributes

edb m_db {}
 数据库类型
std::string m_ip
 数据库IP地址
uint32_t m_port = 0
 数据库端口
std::string m_account
 数据库账号
std::string m_passworld
 数据库密码
std::string m_dbname
 数据库名称

Detailed Description

数据库配置结构体

包含数据库连接的所有配置参数。 支持MySQL和PostgreSQL两种数据库类型。

// MySQL配置示例
ngl::xarg_db db_config;
db_config.m_ip = "127.0.0.1";
db_config.m_port = 3306;
db_config.m_account = "root";
db_config.m_passworld = "password";
db_config.m_dbname = "mydb";

Member Enumeration Documentation

◆ edb

数据库类型枚举

Enumerator
edb_mysql 

MySQL数据库

edb_postgresql 

PostgreSQL数据库


The documentation for this struct was generated from the following file: