Update core

This commit is contained in:
sunkaixuan 2022-03-25 13:43:35 +08:00
parent c499b3b5bd
commit 83ad42094f
2 changed files with 14 additions and 7 deletions

View File

@ -557,9 +557,9 @@ namespace SqlSugar
string sql = sqlObj.Key;
UtilMethods.RepairReplicationParameters(ref sql, sqlObj.Value.ToArray(), i, "Union");
if (sqlObj.Value.HasValue())
allItems.Add(new KeyValuePair<string, List<SugarParameter>>(sql, sqlObj.Value));
allItems.Add(new KeyValuePair<string, List<SugarParameter>>($" ( {sql} ) ", sqlObj.Value));
else
allItems.Add(new KeyValuePair<string, List<SugarParameter>>(sql, new List<SugarParameter>()));
allItems.Add(new KeyValuePair<string, List<SugarParameter>>($" ( {sql} ) ", new List<SugarParameter>()));
i++;
}
var allSql = sqlBuilder.GetUnionSql(allItems.Select(it => it.Key).ToList());
@ -1023,10 +1023,10 @@ namespace SqlSugar
{
try
{
if (this.CurrentConnectionConfig.DbType == DbType.Oracle)
{
throw new Exception("Oracle no support SaveQueues");
}
//if (this.CurrentConnectionConfig.DbType == DbType.Oracle)
//{
// throw new Exception("Oracle no support SaveQueues");
//}
if (this.Queues == null || this.Queues.Count == 0) return default(T);
isTran = isTran && this.Ado.Transaction == null;
if (isTran) this.Ado.BeginTran();

View File

@ -142,7 +142,14 @@ namespace SqlSugar
}
else if (type == UtilConstants.StringType || type == UtilConstants.ObjType)
{
return N + "'" + value.ToString().ToSqlFilter() + "'";
if (value.ToString().Length > 2000)
{
return "to_clob('" + value.ToString().ToSqlFilter() + "')";
}
else
{
return N + "'" + value.ToString().ToSqlFilter() + "'";
}
}
else
{