- 优化 GlobalFilter Apply 自动重命名表达式参数名,避免内容重复问题;

- 修复 表达式解析 Guid.NewGuid() 的错误;
This commit is contained in:
28810
2019-12-05 20:10:39 +08:00
parent e01f7a2061
commit 05cf13f560
14 changed files with 90 additions and 109 deletions

View File

@ -76,19 +76,19 @@ namespace FreeSql.Odbc.PostgreSQL
}
break;
case "NewGuid":
break;
return null;
case "Next":
if (callExp.Object?.Type == typeof(Random)) return "(random()*1000000000)::int4";
break;
return null;
case "NextDouble":
if (callExp.Object?.Type == typeof(Random)) return "random()";
break;
return null;
case "Random":
if (callExp.Method.DeclaringType.IsNumberType()) return "random()";
break;
return null;
case "ToString":
if (callExp.Object != null) return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::varchar" : null;
break;
return null;
}
var objExp = callExp.Object;