mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@ -81,8 +82,16 @@ namespace SqlSugar
|
|||||||
case DbType.Odbc:
|
case DbType.Odbc:
|
||||||
case DbType.TDSQLForPGODBC:
|
case DbType.TDSQLForPGODBC:
|
||||||
// SQL Server 使用中括号转义 %, _ 等
|
// SQL Server 使用中括号转义 %, _ 等
|
||||||
value = value.Replace("[", "[[]")
|
var keyLeft = "[[]";
|
||||||
.Replace("]", "[]]")
|
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}]");
|
.Replace(wildcardStr, $"[{wildcard}]");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user