- 增加 神州通用 ShenTong 实现;#325

This commit is contained in:
28810
2020-06-10 02:07:55 +08:00
parent 7cd7e665da
commit 49aa899f81
51 changed files with 11714 additions and 22 deletions

View File

@ -39,6 +39,11 @@ namespace FreeSql
/// <summary>
/// 北京人大金仓信息技术股份有限公司,基于 Odbc 的实现
/// </summary>
OdbcKingbaseES
OdbcKingbaseES,
/// <summary>
/// 天津神舟通用数据技术有限公司,基于 System.Data.OscarClient.dll 的实现
/// </summary>
ShenTong
}
}

View File

@ -556,6 +556,11 @@
北京人大金仓信息技术股份有限公司,基于 Odbc 的实现
</summary>
</member>
<member name="F:FreeSql.DataType.ShenTong">
<summary>
天津神舟通用数据技术有限公司,基于 System.Data.OscarClient.dll 的实现
</summary>
</member>
<member name="M:FreeSql.Extensions.EntityUtil.EntityUtilExtensions.GetEntityKeyString(IFreeSql,System.Type,System.Object,System.Boolean,System.String)">
<summary>
获取实体的主键值,以 "*|_,[,_|*" 分割,当任意一个主键属性无值时,返回 null
@ -1367,7 +1372,8 @@
Oracle: for update nowait<para></para>
Sqlite: 无效果<para></para>
达梦: for update nowait<para></para>
人大金仓: for update nowait
人大金仓: for update nowait<para></para>
神通: for update nowait
</summary>
<param name="nowait">noawait</param>
<returns></returns>

View File

@ -239,6 +239,11 @@ namespace FreeSql
if (type == null) throwNotFind("FreeSql.Provider.Odbc.dll", "FreeSql.Odbc.KingbaseES.OdbcKingbaseESProvider<>");
break;
case DataType.ShenTong:
type = Type.GetType("FreeSql.ShenTong.ShenTongProvider`1,FreeSql.Provider.ShenTong")?.MakeGenericType(typeof(TMark));
if (type == null) throwNotFind("FreeSql.Provider.ShenTong.dll", "FreeSql.ShenTong.ShenTongProvider<>");
break;
default: throw new Exception("未指定 UseConnectionString 或者 UseConnectionFactory");
}
}

View File

@ -285,7 +285,8 @@ namespace FreeSql
/// Oracle: for update nowait<para></para>
/// Sqlite: 无效果<para></para>
/// 达梦: for update nowait<para></para>
/// 人大金仓: for update nowait
/// 人大金仓: for update nowait<para></para>
/// 神通: for update
/// </summary>
/// <param name="nowait">noawait</param>
/// <returns></returns>

View File

@ -1214,6 +1214,7 @@ namespace FreeSql.Internal.CommonProvider
break;
case DataType.PostgreSQL:
case DataType.OdbcPostgreSQL:
case DataType.OdbcKingbaseES:
_tosqlAppendContent = $" for update{(noawait ? " nowait" : "")}";
break;
case DataType.Oracle:
@ -1224,8 +1225,8 @@ namespace FreeSql.Internal.CommonProvider
break;
case DataType.Sqlite:
break;
case DataType.OdbcKingbaseES:
_tosqlAppendContent = $" for update{(noawait ? " nowait" : "")}";
case DataType.ShenTong: //神通测试中发现,不支持 nowait
_tosqlAppendContent = " for update";
break;
}
return this as TSelect;

View File

@ -244,6 +244,7 @@ namespace FreeSql.Internal
case DataType.PostgreSQL:
case DataType.OdbcPostgreSQL:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
if (strlen < 0) colattr.DbType = "TEXT";
else colattr.DbType = Regex.Replace(colattr.DbType, charPatten, $"$1({strlen})");
break;