mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
Support custom database
This commit is contained in:
@@ -14,6 +14,9 @@ namespace SqlSugar
|
|||||||
PostgreSQL,
|
PostgreSQL,
|
||||||
Dm,
|
Dm,
|
||||||
Kdbndp,
|
Kdbndp,
|
||||||
Oscar
|
Oscar,
|
||||||
|
MySqlConnector,
|
||||||
|
Access,
|
||||||
|
Custom=900
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return new SqlServerQueryable<T>();
|
return new SqlServerQueryable<T>();
|
||||||
}
|
}
|
||||||
else if (currentConnectionConfig.DbType == DbType.MySql)
|
else if (currentConnectionConfig.DbType == DbType.MySql)
|
||||||
{
|
{
|
||||||
return new MySqlQueryable<T>();
|
return new MySqlQueryable<T>();
|
||||||
}
|
}
|
||||||
@@ -33,6 +33,18 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return new PostgreSQLQueryable<T>();
|
return new PostgreSQLQueryable<T>();
|
||||||
}
|
}
|
||||||
|
else if (currentConnectionConfig.DbType == DbType.MySqlConnector)
|
||||||
|
{
|
||||||
|
return CustomProvider.GetQueryable<T>("MySql", "SqlSugar.MySqlConnector");
|
||||||
|
}
|
||||||
|
else if (currentConnectionConfig.DbType == DbType.Access)
|
||||||
|
{
|
||||||
|
return CustomProvider.GetQueryable<T>("MySql", "SqlSugar.Access");
|
||||||
|
}
|
||||||
|
else if (currentConnectionConfig.DbType == DbType.Custom)
|
||||||
|
{
|
||||||
|
return CustomProvider.GetQueryable<T>("DbType.Custom", "DbType.Custom");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string className = "Queryable";
|
string className = "Queryable";
|
||||||
|
16
Src/Asp.Net/SqlSugar/Realization/Custom/CustomProvider.cs
Normal file
16
Src/Asp.Net/SqlSugar/Realization/Custom/CustomProvider.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SqlSugar
|
||||||
|
{
|
||||||
|
public class CustomProvider
|
||||||
|
{
|
||||||
|
internal static ISugarQueryable<T> GetQueryable<T>(string dbName, string dllName)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -102,6 +102,7 @@
|
|||||||
<Compile Include="Interface\IFastBuilder.cs" />
|
<Compile Include="Interface\IFastBuilder.cs" />
|
||||||
<Compile Include="Interface\IFastest.cs" />
|
<Compile Include="Interface\IFastest.cs" />
|
||||||
<Compile Include="OnlyNet\OracleFastBuilder.cs" />
|
<Compile Include="OnlyNet\OracleFastBuilder.cs" />
|
||||||
|
<Compile Include="Realization\Custom\CustomProvider.cs" />
|
||||||
<Compile Include="Realization\MySql\SqlBuilder\MySqlFastBuilder.cs" />
|
<Compile Include="Realization\MySql\SqlBuilder\MySqlFastBuilder.cs" />
|
||||||
<Compile Include="Realization\PostgreSQL\SqlBuilder\PostgreSQLFastBuilder.cs" />
|
<Compile Include="Realization\PostgreSQL\SqlBuilder\PostgreSQLFastBuilder.cs" />
|
||||||
<Compile Include="Realization\Sqlite\SqlBuilder\SqliteFastBuilder.cs" />
|
<Compile Include="Realization\Sqlite\SqlBuilder\SqliteFastBuilder.cs" />
|
||||||
|
Reference in New Issue
Block a user