mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 01:05:27 +08:00 
			
		
		
		
	- 修复 .Contains('b%') 部分数据库函数参数位置错误;#1826
This commit is contained in:
		@@ -385,9 +385,9 @@ namespace FreeSql.KingbaseES
 | 
			
		||||
                        if (args0Value == "NULL") return $"({left}) IS NULL";
 | 
			
		||||
                        if (args0Value.Contains("%"))
 | 
			
		||||
                        {
 | 
			
		||||
                            if (exp.Method.Name == "StartsWith") return $"strpos({args0Value}, {left}) = 1";
 | 
			
		||||
                            if (exp.Method.Name == "EndsWith") return $"strpos({args0Value}, {left}) = char_length({args0Value})";
 | 
			
		||||
                            return $"strpos({args0Value}, {left}) > 0";
 | 
			
		||||
                            if (exp.Method.Name == "StartsWith") return $"strpos({left}, {args0Value}) = 1";
 | 
			
		||||
                            if (exp.Method.Name == "EndsWith") return $"strpos({left}, {args0Value}) = char_length({left})-char_length({args0Value})+1";
 | 
			
		||||
                            return $"strpos({left}, {args0Value}) > 0";
 | 
			
		||||
                        }
 | 
			
		||||
                        var likeOpt = "LIKE";
 | 
			
		||||
                        if (exp.Arguments.Count > 1)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user