- 增加 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

@ -314,7 +314,7 @@ namespace FreeSql.Sqlite
case "Equals": return $"({left} = {getExp(exp.Arguments[0])})";
}
}
throw new Exception($"SqliteExpression 未实现函数表达式 {exp} 解析");
return null;
}
public override string ExpressionLambdaToSqlCallMath(MethodCallExpression exp, ExpTSC tsc)
{
@ -342,7 +342,7 @@ namespace FreeSql.Sqlite
case "Atan2": return $"atan2({getExp(exp.Arguments[0])}, {getExp(exp.Arguments[1])})";
//case "Truncate": return $"truncate({getExp(exp.Arguments[0])}, 0)";
}
throw new Exception($"SqliteExpression 未实现函数表达式 {exp} 解析");
return null;
}
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
{
@ -392,7 +392,7 @@ namespace FreeSql.Sqlite
case "ToString": return $"strftime('%Y-%m-%d %H:%M.%f',{left})";
}
}
throw new Exception($"SqliteExpression 未实现函数表达式 {exp} 解析");
return null;
}
public override string ExpressionLambdaToSqlCallTimeSpan(MethodCallExpression exp, ExpTSC tsc)
{
@ -428,7 +428,7 @@ namespace FreeSql.Sqlite
case "ToString": return $"cast({left} as character)";
}
}
throw new Exception($"SqliteExpression 未实现函数表达式 {exp} 解析");
return null;
}
public override string ExpressionLambdaToSqlCallConvert(MethodCallExpression exp, ExpTSC tsc)
{
@ -454,7 +454,7 @@ namespace FreeSql.Sqlite
case "ToUInt64": return $"cast({getExp(exp.Arguments[0])} as decimal(21,0))";
}
}
throw new Exception($"SqliteExpression 未实现函数表达式 {exp} 解析");
return null;
}
}
}