文字错误更正

This commit is contained in:
28810
2019-03-04 11:22:52 +08:00
parent 30385d2e91
commit a2a3bb62d2
26 changed files with 54 additions and 54 deletions

View File

@ -22,7 +22,7 @@ namespace FreeSql {
/// <summary>
/// 使用缓存,不指定默认使用内存
/// </summary>
/// <param name="cache">缓存实</param>
/// <param name="cache">缓存实</param>
/// <returns></returns>
public FreeSqlBuilder UseCache(IDistributedCache cache) {
_cache = cache;

View File

@ -297,7 +297,7 @@ namespace FreeSql.Internal {
}
var other3Exp = ExpressionLambdaToSqlOther(exp3, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
if (string.IsNullOrEmpty(other3Exp) == false) return other3Exp;
throw new Exception($"未实函数表达式 {exp3} 解析");
throw new Exception($"未实函数表达式 {exp3} 解析");
case ExpressionType.MemberAccess:
var exp4 = exp as MemberExpression;
if (exp4.Expression != null && exp4.Expression.Type.IsArray == false && exp4.Expression.Type.IsNullableType()) return ExpressionLambdaToSql(exp4.Expression, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -380,7 +380,7 @@ namespace FreeSql.Internal {
exp2 = expStack.Pop();
switch (exp2.NodeType) {
case ExpressionType.Constant:
throw new NotImplementedException("未实 MemberAccess 下的 Constant");
throw new NotImplementedException("未实 MemberAccess 下的 Constant");
case ExpressionType.Parameter:
case ExpressionType.MemberAccess:

View File

@ -25,7 +25,7 @@ namespace FreeSql.Internal.CommonProvider {
try { Cache.Remove($"{key1}|{key2}"); } catch { } // redis-cluster 不允许执行 multi keys 命令
CacheSupportMultiRemove = Cache.Get(key1) == null && cache.Get(key2) == null;
if (CacheSupportMultiRemove == false) {
log.LogWarning("FreeSql Warning: 低性能, IDistributedCache 没实批量删除缓存 Cache.Remove(\"key1|key2\").");
log.LogWarning("FreeSql Warning: 低性能, IDistributedCache 没实批量删除缓存 Cache.Remove(\"key1|key2\").");
Remove(key1, key2);
}
}
@ -99,7 +99,7 @@ namespace FreeSql.Internal.CommonProvider {
public T Shell<T>(string key, int timeoutSeconds, Func<T> getData) {
if (timeoutSeconds <= 0) return getData();
if (Cache == null) throw new Exception("缓存实 IDistributedCache 为 null");
if (Cache == null) throw new Exception("缓存实 IDistributedCache 为 null");
var cacheValue = Cache.Get(key);
if (cacheValue != null) {
try {
@ -117,7 +117,7 @@ namespace FreeSql.Internal.CommonProvider {
public T Shell<T>(string key, string field, int timeoutSeconds, Func<T> getData) {
if (timeoutSeconds <= 0) return getData();
if (Cache == null) throw new Exception("缓存实 IDistributedCache 为 null");
if (Cache == null) throw new Exception("缓存实 IDistributedCache 为 null");
var hashkey = $"{key}:{field}";
var cacheValue = Cache.Get(hashkey);
if (cacheValue != null) {
@ -137,7 +137,7 @@ namespace FreeSql.Internal.CommonProvider {
async public Task<T> ShellAsync<T>(string key, int timeoutSeconds, Func<Task<T>> getDataAsync) {
if (timeoutSeconds <= 0) return await getDataAsync();
if (Cache == null) throw new Exception("缓存实 IDistributedCache 为 null");
if (Cache == null) throw new Exception("缓存实 IDistributedCache 为 null");
var cacheValue = await Cache.GetAsync(key);
if (cacheValue != null) {
try {
@ -155,7 +155,7 @@ namespace FreeSql.Internal.CommonProvider {
async public Task<T> ShellAsync<T>(string key, string field, int timeoutSeconds, Func<Task<T>> getDataAsync) {
if (timeoutSeconds <= 0) return await getDataAsync();
if (Cache == null) throw new Exception("缓存实 IDistributedCache 为 null");
if (Cache == null) throw new Exception("缓存实 IDistributedCache 为 null");
var hashkey = $"{key}:{field}";
var cacheValue = await Cache.GetAsync(hashkey);
if (cacheValue != null) {

View File

@ -39,7 +39,7 @@ namespace FreeSql.Internal.CommonProvider {
case "InnerJoin": this.InternalJoin(expCall.Arguments[0], SelectTableInfoType.InnerJoin); break;
case "RightJoin": this.InternalJoin(expCall.Arguments[0], SelectTableInfoType.RightJoin); break;
default: throw new NotImplementedException($"未实 {expCall.Method.Name}");
default: throw new NotImplementedException($"未实 {expCall.Method.Name}");
}
}
}

View File

@ -61,7 +61,7 @@ public abstract class MygisGeometry {
else if (wkt.StartsWith("multipoint", StringComparison.CurrentCultureIgnoreCase)) return new MygisMultiPoint(ParseLineString(wkt.Substring(10).Trim('(', ')')));
else if (wkt.StartsWith("multilinestring", StringComparison.CurrentCultureIgnoreCase)) return new MygisMultiLineString(ParseMultiLineString(wkt.Substring(15).Trim('(', ')')));
else if (wkt.StartsWith("multipolygon", StringComparison.CurrentCultureIgnoreCase)) return new MygisMultiPolygon(ParseMultiPolygon(wkt.Substring(12).Trim('(', ')')));
throw new NotImplementedException($"MygisGeometry.Parse 未实 \"{wkt}\"");
throw new NotImplementedException($"MygisGeometry.Parse 未实 \"{wkt}\"");
}
static MygisPoint ParsePoint(string str) {
var m = regexMygisPoint.Match(str);

View File

@ -187,7 +187,7 @@ namespace FreeSql.MySql {
case "Equals": return $"({left} = {getExp(exp.Arguments[0])})";
}
}
throw new Exception($"MySqlExpression 未实函数表达式 {exp} 解析");
throw new Exception($"MySqlExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallMath(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -213,7 +213,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} 解析");
throw new Exception($"MySqlExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -256,7 +256,7 @@ namespace FreeSql.MySql {
case "ToString": return $"date_format({left}, '%Y-%m-%d %H:%i:%s.%f')";
}
}
throw new Exception($"MySqlExpression 未实函数表达式 {exp} 解析");
throw new Exception($"MySqlExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallTimeSpan(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -286,7 +286,7 @@ namespace FreeSql.MySql {
case "ToString": return $"cast({left} as char)";
}
}
throw new Exception($"MySqlExpression 未实函数表达式 {exp} 解析");
throw new Exception($"MySqlExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallConvert(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -309,7 +309,7 @@ namespace FreeSql.MySql {
case "ToUInt64": return $"cast({getExp(exp.Arguments[0])} as unsigned)";
}
}
throw new Exception($"MySqlExpression 未实函数表达式 {exp} 解析");
throw new Exception($"MySqlExpression 未实函数表达式 {exp} 解析");
}
}
}

View File

@ -187,7 +187,7 @@ namespace FreeSql.Oracle {
case "Equals": return $"({left} = {getExp(exp.Arguments[0])})";
}
}
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallMath(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -214,7 +214,7 @@ namespace FreeSql.Oracle {
//case "Atan2": return $"atan2({getExp(exp.Arguments[0])}, {getExp(exp.Arguments[1])})";
case "Truncate": return $"trunc({getExp(exp.Arguments[0])}, 0)";
}
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -257,7 +257,7 @@ namespace FreeSql.Oracle {
case "ToString": return $"to_char({left},'YYYY-MM-DD HH24:MI:SS.FF6')";
}
}
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallTimeSpan(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -287,7 +287,7 @@ namespace FreeSql.Oracle {
case "ToString": return $"to_char({left})";
}
}
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallConvert(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -310,7 +310,7 @@ namespace FreeSql.Oracle {
case "ToUInt64": return $"cast({getExp(exp.Arguments[0])} as number)";
}
}
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
throw new Exception($"OracleExpression 未实函数表达式 {exp} 解析");
}
}
}

View File

@ -284,7 +284,7 @@ namespace FreeSql.PostgreSQL {
case "Equals": return $"({left} = ({getExp(exp.Arguments[0])})::varchar)";
}
}
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallMath(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -310,7 +310,7 @@ namespace FreeSql.PostgreSQL {
case "Atan2": return $"atan2({getExp(exp.Arguments[0])}, {getExp(exp.Arguments[1])})";
case "Truncate": return $"trunc({getExp(exp.Arguments[0])}, 0)";
}
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -353,7 +353,7 @@ namespace FreeSql.PostgreSQL {
case "ToString": return $"to_char({left}, 'YYYY-MM-DD HH24:MI:SS.US')";
}
}
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallTimeSpan(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -383,7 +383,7 @@ namespace FreeSql.PostgreSQL {
case "ToString": return $"({left})::varchar";
}
}
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallConvert(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -406,7 +406,7 @@ namespace FreeSql.PostgreSQL {
case "ToUInt64": return $"({getExp(exp.Arguments[0])})::int8";
}
}
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
throw new Exception($"PostgreSQLExpression 未实函数表达式 {exp} 解析");
}
}
}

View File

@ -169,7 +169,7 @@ namespace FreeSql.SqlServer {
case "Equals": return $"({left} = {getExp(exp.Arguments[0])})";
}
}
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallMath(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -195,7 +195,7 @@ namespace FreeSql.SqlServer {
case "Atan2": return $"atan2({getExp(exp.Arguments[0])}, {getExp(exp.Arguments[1])})";
case "Truncate": return $"floor({getExp(exp.Arguments[0])})";
}
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -238,7 +238,7 @@ namespace FreeSql.SqlServer {
case "ToString": return $"convert(varchar, {left}, 121)";
}
}
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallTimeSpan(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -268,7 +268,7 @@ namespace FreeSql.SqlServer {
case "ToString": return $"cast({left} as varchar)";
}
}
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallConvert(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -291,7 +291,7 @@ namespace FreeSql.SqlServer {
case "ToUInt64": return $"cast({getExp(exp.Arguments[0])} as bigint)";
}
}
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
throw new Exception($"SqlServerExpression 未实函数表达式 {exp} 解析");
}
}
}

View File

@ -192,7 +192,7 @@ namespace FreeSql.Sqlite {
case "Equals": return $"({left} = {getExp(exp.Arguments[0])})";
}
}
throw new Exception($"SqliteExpression 未实函数表达式 {exp} 解析");
throw new Exception($"SqliteExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallMath(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -218,7 +218,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} 解析");
throw new Exception($"SqliteExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -261,7 +261,7 @@ namespace FreeSql.Sqlite {
case "ToString": return $"strftime('%Y-%m-%d %H:%M.%f',{left})";
}
}
throw new Exception($"SqliteExpression 未实函数表达式 {exp} 解析");
throw new Exception($"SqliteExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallTimeSpan(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -291,7 +291,7 @@ namespace FreeSql.Sqlite {
case "ToString": return $"cast({left} as character)";
}
}
throw new Exception($"SqliteExpression 未实函数表达式 {exp} 解析");
throw new Exception($"SqliteExpression 未实函数表达式 {exp} 解析");
}
internal override string ExpressionLambdaToSqlCallConvert(MethodCallExpression exp, List<SelectTableInfo> _tables, List<SelectColumnInfo> _selectColumnMap, Func<Expression[], string> getSelectGroupingMapString, SelectTableInfoType tbtype, bool isQuoteName) {
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, _tables, _selectColumnMap, getSelectGroupingMapString, tbtype, isQuoteName);
@ -314,7 +314,7 @@ namespace FreeSql.Sqlite {
case "ToUInt64": return $"cast({getExp(exp.Arguments[0])} as decimal(21,0))";
}
}
throw new Exception($"SqliteExpression 未实函数表达式 {exp} 解析");
throw new Exception($"SqliteExpression 未实函数表达式 {exp} 解析");
}
}
}