mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	- 兼容 SqlServer varchar/nvarchar 表达式解析,分别解析为:N'' 和 '';
This commit is contained in:
		@@ -160,11 +160,11 @@ namespace FreeSql.PostgreSQL
 | 
			
		||||
                                if (left.StartsWith("(") || left.EndsWith(")")) left = $"array[{left.TrimStart('(').TrimEnd(')')}]";
 | 
			
		||||
                                return $"(case when {left} is null then 0 else array_length({left},1) end > 0)";
 | 
			
		||||
                            case "Contains":
 | 
			
		||||
                                tsc?.SetMapTypeTmp(null);
 | 
			
		||||
                                tsc.SetMapColumnTmp(null);
 | 
			
		||||
                                var args1 = getExp(callExp.Arguments[argIndex]);
 | 
			
		||||
                                var oldMapType = tsc?.SetMapTypeReturnOld(tsc?.mapTypeTmp);
 | 
			
		||||
                                var oldMapType = tsc.SetMapTypeReturnOld(tsc.mapTypeTmp);
 | 
			
		||||
                                left = objExp == null ? null : getExp(objExp);
 | 
			
		||||
                                tsc.SetMapTypeReturnOld(oldMapType);
 | 
			
		||||
                                tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
 | 
			
		||||
                                //判断 in 或 array @> array
 | 
			
		||||
                                if (left.StartsWith("array[") || left.EndsWith("]"))
 | 
			
		||||
                                    return $"{args1} in ({left.Substring(6, left.Length - 7)})";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user