mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
## v0.9.17 (ODBC)
- 增加 FreeSql.Provider.Odbc,实现 Oracle/SqlServer/MySql 的 Odbc 访问提供; - 增加 FreeSqlBuilder.UseConnectionString 参数 providerType,可解决因包版本冲突时,可能无法反射获得 FreeSql.Provider 对应的类型,通常这个参数不需要设置; - 优化 MaxLength 特性,当指定为 -1 时 DbType 会分别映射类型 text/nvarchar(max)/nvarchar2(4000);
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
|
||||
<Version>0.9.16</Version>
|
||||
<Version>0.9.17</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>FreeSql 数据库实现,基于 Oracle 11</Description>
|
||||
|
@ -21,9 +21,9 @@ namespace FreeSql.Oracle
|
||||
|
||||
public OracleConnectionPool(string name, string connectionString, Action availableHandler, Action unavailableHandler) : base(null)
|
||||
{
|
||||
var userIdMatch = Regex.Match(connectionString, @"User\s+Id\s*=\s*([^;]+)", RegexOptions.IgnoreCase);
|
||||
if (userIdMatch.Success == false) throw new Exception(@"从 ConnectionString 中无法匹配 User\s+Id\s+=([^;]+)");
|
||||
this.UserId = userIdMatch.Groups[1].Value.Trim().ToUpper();
|
||||
var userIdMatch = Regex.Match(connectionString, @"(User\s+Id|Uid)\s*=\s*([^;]+)", RegexOptions.IgnoreCase);
|
||||
if (userIdMatch.Success == false) throw new Exception(@"从 ConnectionString 中无法匹配 (User\s+Id|Uid)\s*=\s*([^;]+)");
|
||||
this.UserId = userIdMatch.Groups[2].Value.Trim().ToUpper();
|
||||
|
||||
var policy = new OracleConnectionPoolPolicy
|
||||
{
|
||||
|
@ -7,6 +7,6 @@
|
||||
/// <param name="that"></param>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
public static string FormatOracleSQL(this string that, params object[] args) => _oracleAdo.Addslashes(that, args);
|
||||
public static string FormatOracle(this string that, params object[] args) => _oracleAdo.Addslashes(that, args);
|
||||
static FreeSql.Oracle.OracleAdo _oracleAdo = new FreeSql.Oracle.OracleAdo();
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ namespace FreeSql.Oracle
|
||||
return ret;
|
||||
});
|
||||
|
||||
public override string FormatSql(string sql, params object[] args) => sql?.FormatOracleSQL(args);
|
||||
public override string FormatSql(string sql, params object[] args) => sql?.FormatOracle(args);
|
||||
public override string QuoteSqlName(string name)
|
||||
{
|
||||
var nametrim = name.Trim();
|
||||
|
Reference in New Issue
Block a user