- 增加 表达式树函数解析 byte[] Length;#505

This commit is contained in:
2881099
2020-10-31 07:03:00 +08:00
parent b86676df4e
commit 454eb8cc44
19 changed files with 369 additions and 20 deletions

View File

@ -18,6 +18,10 @@ namespace FreeSql.Odbc.Dameng
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
switch (exp.NodeType)
{
case ExpressionType.ArrayLength:
var arrOper = (exp as UnaryExpression)?.Operand;
if (arrOper.Type == typeof(byte[])) return $"lengthb({getExp(arrOper)})";
break;
case ExpressionType.Convert:
var operandExp = (exp as UnaryExpression)?.Operand;
var gentype = exp.Type.NullableTypeOrThis();