- 增加 FreeSql.Extensions.JsonMap 扩展包,实现快速将对象映射为json字符串的方法;
- 优化 表达式解析未实现的错误提醒,如 $"";
This commit is contained in:
28810
2019-09-13 00:23:52 +08:00
parent 8520008b82
commit 62a095df8f
33 changed files with 249 additions and 53 deletions

View File

@ -310,7 +310,7 @@ namespace FreeSql.MySql
case "Equals": return $"({left} = {getExp(exp.Arguments[0])})";
}
}
throw new Exception($"MySqlExpression 未实现函数表达式 {exp} 解析");
return null;
}
public override string ExpressionLambdaToSqlCallMath(MethodCallExpression exp, ExpTSC tsc)
{
@ -338,7 +338,7 @@ namespace FreeSql.MySql
case "Atan2": return $"atan2({getExp(exp.Arguments[0])}, {getExp(exp.Arguments[1])})";
case "Truncate": return $"truncate({getExp(exp.Arguments[0])}, 0)";
}
throw new Exception($"MySqlExpression 未实现函数表达式 {exp} 解析");
return null;
}
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
{
@ -388,7 +388,7 @@ namespace FreeSql.MySql
case "ToString": return $"date_format({left}, '%Y-%m-%d %H:%i:%s.%f')";
}
}
throw new Exception($"MySqlExpression 未实现函数表达式 {exp} 解析");
return null;
}
public override string ExpressionLambdaToSqlCallTimeSpan(MethodCallExpression exp, ExpTSC tsc)
{
@ -424,7 +424,7 @@ namespace FreeSql.MySql
case "ToString": return $"cast({left} as char)";
}
}
throw new Exception($"MySqlExpression 未实现函数表达式 {exp} 解析");
return null;
}
public override string ExpressionLambdaToSqlCallConvert(MethodCallExpression exp, ExpTSC tsc)
{
@ -450,7 +450,7 @@ namespace FreeSql.MySql
case "ToUInt64": return $"cast({getExp(exp.Arguments[0])} as unsigned)";
}
}
throw new Exception($"MySqlExpression 未实现函数表达式 {exp} 解析");
return null;
}
}
}