- 增加 pgsql 表达式树解析 hstore[""];

This commit is contained in:
2881099
2020-11-23 10:56:55 +08:00
parent 44e6eb2979
commit 441309e0d0
5 changed files with 12 additions and 7 deletions

View File

@ -118,11 +118,12 @@ namespace FreeSql.Odbc.PostgreSQL
if (objType != null || objType.IsArrayOrList())
{
string left = null;
if (objType.FullName == typeof(Dictionary<string, string>).FullName)
if (objType == typeof(Dictionary<string, string>))
{
left = objExp == null ? null : getExp(objExp);
switch (callExp.Method.Name)
{
case "get_Item": return $"{left}->{getExp(callExp.Arguments[argIndex])}";
case "Contains":
var right = getExp(callExp.Arguments[argIndex]);
return $"({left} @> ({right}))";
@ -206,7 +207,7 @@ namespace FreeSql.Odbc.PostgreSQL
}
break;
}
if (memParentExp.FullName == typeof(Dictionary<string, string>).FullName)
if (memParentExp == typeof(Dictionary<string, string>))
{
var left = getExp(memExp.Expression);
switch (memExp.Member.Name)