Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问支持MongoDB数据库吗 #52

Open
ax75974 opened this issue Aug 6, 2024 · 2 comments
Open

请问支持MongoDB数据库吗 #52

ax75974 opened this issue Aug 6, 2024 · 2 comments

Comments

@ax75974
Copy link

ax75974 commented Aug 6, 2024

我使用的是MongoDB数据库,但是发现相关代码中没有提供

private static void SetYourDataBaseType()
{
    //备注:用户需要在此进行数据库类型的选择

    //根据不同的数据库类型创建
    SetDBType(DBTypeEnum.SQLSERVER);        //默认SQL SERVER

    //如果是Oracle数据库,请使用Oracle类型参数
    //SetDBType(DBTypeEnum.ORACLE);

    //SetDBType(DBTypeEnum.MYSQL);

    //SetDBType(DBTypeEnum.PGSQL);
}
/// <summary>
/// 设置数据库类型
/// </summary>
/// <param name="type">数据库类型</param>
public static void SetDBType(DBTypeEnum type)
{
    // 设置数据库类型  
    _dbType = type;

    // 设置数据库Dialect
    if (type == DBTypeEnum.SQLSERVER)
    {
        //默认实现为SQLSERVER
        DapperExtensions.DapperExtensions.SqlDialect = new DapperExtensions.Sql.SqlServerDialect();
    }
    else if (type == DBTypeEnum.ORACLE)
    {
        //Oracle 数据库
        DapperExtensions.DapperExtensions.SqlDialect = new DapperExtensions.Sql.OracleDialect();
    }
    else if (type == DBTypeEnum.MYSQL)
    {
        //MySQL 数据库
        DapperExtensions.DapperExtensions.SqlDialect = new DapperExtensions.Sql.MySqlDialect();
    }
    else if (type == DBTypeEnum.PGSQL)
    {
        //PgSQL 数据库
        DapperExtensions.DapperExtensions.SqlDialect = new DapperExtensions.Sql.PostgreSqlDialect();
    }
    else if (type == DBTypeEnum.KINGBASE)
    {
        //KingBase 数据库
        DapperExtensions.DapperExtensions.SqlDialect = new DapperExtensions.Sql.KingbaseSqlDialect();
    }
}
@besley
Copy link
Owner

besley commented Aug 8, 2024

Hi,你好!引擎产品后端数据库比较适合关系型数据库,内部会做数据库表关联查询等SQL处理,这样执行效率也会高一些吧,我们暂时还没有做MongoDB的支持

@besley
Copy link
Owner

besley commented Sep 8, 2024

如果您需要MongoDB数据库的支持,可以跟我联系,咨询做定制开发:WeChat: besley2008

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants