1#ifndef MSTL_DATABASE_DB_CONFIG_HPP__
2#define MSTL_DATABASE_DB_CONFIG_HPP__
3#include "../core/string/string.hpp"
11#ifdef MSTL_SUPPORT_MYSQL__
14#ifdef MSTL_SUPPORT_SQLITE3__
17#ifdef MSTL_SUPPORT_REDIS__
20#ifdef MSTL_SUPPORT_POSTGRESQL__
25struct MSTL_API db_config {
29 string host =
"127.0.0.1";
33#ifdef MSTL_SUPPORT_POSTGRESQL__
34 static db_config for_postgresql(
const string& db =
"postgres");
37#ifdef MSTL_SUPPORT_MYSQL__
38 static db_config for_mysql(
const string& db);
41#ifdef MSTL_SUPPORT_SQLITE3__
42 static db_config for_sqlite(
const string& file);
45#ifdef MSTL_SUPPORT_REDIS__
46 static db_config for_redis(
const string& db);
unsigned short uint16_t
16位无符号整数类型
#define MSTL_ERROR_BUILD_FINAL_CLASS(THIS, BASE, INFO)
构建最终异常类宏
#define MSTL_END_NAMESPACE__
结束全局命名空间MSTL
#define MSTL_BEGIN_NAMESPACE__
开始全局命名空间MSTL