Update Oscar

This commit is contained in:
sunkaixuna
2021-09-05 11:29:26 +08:00
parent 6b905b93b7
commit 33bc22d111
3 changed files with 25 additions and 3 deletions

View File

@@ -16,16 +16,16 @@ namespace OrmTest
/// Account have permission to create database /// Account have permission to create database
/// 用有建库权限的数据库账号 /// 用有建库权限的数据库账号
/// </summary> /// </summary>
public static string ConnectionString = "PORT=5432;DATABASE=SqlSugar4xTest;HOST=localhost;PASSWORD=haosql;USER ID=postgres"; public static string ConnectionString = "PORT=2003;DATABASE=SqlSugar4xTest;HOST=localhost;PASSWORD=szoscar55;USER ID=SYSDBA";
/// <summary> /// <summary>
/// Account have permission to create database /// Account have permission to create database
/// 用有建库权限的数据库账号 /// 用有建库权限的数据库账号
/// </summary> /// </summary>
public static string ConnectionString2 = "PORT=5432;DATABASE=SqlSugar4xTest2;HOST=localhost;PASSWORD=haosql;USER ID=postgres"; public static string ConnectionString2 = "PORT=2003;DATABASE=SqlSugar4xTest2;HOST=localhost;PASSWORD=szoscar55;USER ID=SYSDBA";
/// <summary> /// <summary>
/// Account have permission to create database /// Account have permission to create database
/// 用有建库权限的数据库账号 /// 用有建库权限的数据库账号
/// </summary> /// </summary>
public static string ConnectionString3 = "PORT=5432;DATABASE=SqlSugar4xTest3;HOST=localhost;PASSWORD=haosql;USER ID=postgres"; public static string ConnectionString3 = "PORT=2003;DATABASE=SqlSugar4xTest3;HOST=localhost;PASSWORD=szoscar55;USER ID=SYSDBA";
} }
} }

View File

@@ -374,6 +374,9 @@ namespace SqlSugar
case DbType.Dm: case DbType.Dm:
DependencyManagement.TryDm(); DependencyManagement.TryDm();
break; break;
case DbType.Oscar:
DependencyManagement.TryOscar();
break;
default: default:
throw new Exception("ConnectionConfig.DbType is null"); throw new Exception("ConnectionConfig.DbType is null");
} }

View File

@@ -15,6 +15,7 @@ namespace SqlSugar
private static bool IsTryPgSql = false; private static bool IsTryPgSql = false;
private static bool IsTryDm = false; private static bool IsTryDm = false;
private static bool IsTryKd = false; private static bool IsTryKd = false;
private static bool IsTryOscar = false;
public static void TryJsonNet() public static void TryJsonNet()
{ {
if (!IsTryJsonNet) if (!IsTryJsonNet)
@@ -149,5 +150,23 @@ namespace SqlSugar
} }
} }
} }
public static void TryOscar()
{
if (!IsTryOscar)
{
try
{
OscarProvider db = new OscarProvider();
var conn = db.GetAdapter();
IsTryOscar = true;
}
catch (Exception ex)
{
var message = "需要引用Oscar.Data.SqlClient.dll,Github搜索sqlsugar源码里面有";
throw new Exception(message);
}
}
}
} }
} }