- 增加 "x1".First/FirstOrDefault 表达式函数解析;

This commit is contained in:
28810
2020-07-31 02:28:37 +08:00
parent f63a69c55c
commit af153295f8
33 changed files with 364 additions and 1 deletions

View File

@ -101,6 +101,16 @@ namespace FreeSql.Odbc.PostgreSQL
objExp = callExp.Arguments.FirstOrDefault();
objType = objExp?.Type;
argIndex++;
if (objType == typeof(string))
{
switch (callExp.Method.Name)
{
case "First":
case "FirstOrDefault":
return $"substr({getExp(callExp.Arguments[0])}, 1, 1)";
}
}
}
if (objType == null) objType = callExp.Method.DeclaringType;
if (objType != null || objType.IsArrayOrList())