mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 09:44:39 +08:00
Update Oscar
This commit is contained in:
@@ -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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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");
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user