mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 04:35:29 +08:00
Update Utils
This commit is contained in:
parent
a5f8aebd8e
commit
6d5a61fe6f
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Dm.util;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -81,8 +82,16 @@ namespace SqlSugar
|
||||
case DbType.Odbc:
|
||||
case DbType.TDSQLForPGODBC:
|
||||
// SQL Server 使用中括号转义 %, _ 等
|
||||
value = value.Replace("[", "[[]")
|
||||
.Replace("]", "[]]")
|
||||
var keyLeft = "[[]";
|
||||
var keyRight = "[]]";
|
||||
var leftGuid = Guid.NewGuid().toString();
|
||||
var rightGuid = Guid.NewGuid().toString();
|
||||
value = value.Replace("[", leftGuid)
|
||||
.Replace("]", rightGuid);
|
||||
|
||||
value = value.Replace(leftGuid, keyLeft)
|
||||
.Replace(rightGuid, keyRight);
|
||||
value =value
|
||||
.Replace(wildcardStr, $"[{wildcard}]");
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user