mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-30 02:14:44 +08:00
-
This commit is contained in:
@@ -16,8 +16,6 @@ namespace SqlSugar
|
||||
public const string SqlFuncFullName = "SqlSugar.SqlFunc";
|
||||
public const string MethodConst = "MethodConst";
|
||||
public const string Const = "Const";
|
||||
public const string Dot = ".";
|
||||
public const char DotChar = '.';
|
||||
public readonly static Type MemberExpressionType = typeof(MemberExpression);
|
||||
public readonly static Type ConstantExpressionType = typeof(ConstantExpression);
|
||||
}
|
||||
|
||||
@@ -128,16 +128,16 @@ namespace SqlSugar
|
||||
Check.ArgumentNullException(entityName, string.Format(ErrorMessage.ObjNotExist, "Table Name"));
|
||||
if (IsTranslationText(entityName)) return entityName;
|
||||
isMapping = isMapping && this.MappingTables.IsValuable();
|
||||
var isComplex = entityName.Contains(ExpressionConst.Dot);
|
||||
var isComplex = entityName.Contains(UtilConstants.Dot);
|
||||
if (isMapping && isComplex)
|
||||
{
|
||||
var columnInfo = entityName.Split(ExpressionConst.DotChar);
|
||||
var columnInfo = entityName.Split(UtilConstants.DotChar);
|
||||
var mappingInfo = this.MappingTables.FirstOrDefault(it => it.EntityName.Equals(columnInfo.Last(), StringComparison.CurrentCultureIgnoreCase));
|
||||
if (mappingInfo != null)
|
||||
{
|
||||
columnInfo[columnInfo.Length - 1] = mappingInfo.EntityName;
|
||||
}
|
||||
return string.Join(ExpressionConst.Dot, columnInfo.Select(it => GetTranslationText(it)));
|
||||
return string.Join(UtilConstants.Dot, columnInfo.Select(it => GetTranslationText(it)));
|
||||
}
|
||||
else if (isMapping)
|
||||
{
|
||||
@@ -146,7 +146,7 @@ namespace SqlSugar
|
||||
}
|
||||
else if (isComplex)
|
||||
{
|
||||
return string.Join(ExpressionConst.Dot, entityName.Split(ExpressionConst.DotChar).Select(it => GetTranslationText(it)));
|
||||
return string.Join(UtilConstants.Dot, entityName.Split(UtilConstants.DotChar).Select(it => GetTranslationText(it)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -161,9 +161,9 @@ namespace SqlSugar
|
||||
return columnName;
|
||||
}
|
||||
if (IsTranslationText(columnName)) return columnName;
|
||||
if (columnName.Contains(ExpressionConst.Dot))
|
||||
if (columnName.Contains(UtilConstants.Dot))
|
||||
{
|
||||
return string.Join(ExpressionConst.Dot, columnName.Split(ExpressionConst.DotChar).Select(it => GetTranslationText(it)));
|
||||
return string.Join(UtilConstants.Dot, columnName.Split(UtilConstants.DotChar).Select(it => GetTranslationText(it)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -6,31 +6,32 @@ namespace SqlSugar
|
||||
{
|
||||
internal static class UtilConstants
|
||||
{
|
||||
|
||||
public const string Dot = ".";
|
||||
public const char DotChar = '.';
|
||||
internal const string Space = " ";
|
||||
internal const string AssemblyName = "SqlSugar";
|
||||
internal const string OrderReplace = "{662E689B-17A1-4D06-9D27-F29EAB8BC3D6}";
|
||||
|
||||
internal static Type StringType = typeof(string);
|
||||
internal static Type ShortType = typeof(short);
|
||||
internal static Type IntType = typeof(int);
|
||||
internal static Type LongType = typeof(long);
|
||||
internal static Type DecType = typeof(decimal);
|
||||
internal static Type GuidType = typeof(Guid);
|
||||
internal static Type DateType = typeof(DateTime);
|
||||
internal static Type ByteType = typeof(Byte);
|
||||
internal static Type ByteArrayType = typeof(byte[]);
|
||||
internal static Type BoolType = typeof(bool);
|
||||
internal static Type ByteType = typeof(Byte);
|
||||
internal static Type ObjType = typeof(object);
|
||||
internal static Type DobType = typeof(double);
|
||||
internal static Type FloatType=typeof(float);
|
||||
internal static Type FloatType = typeof(float);
|
||||
internal static Type ShortType = typeof(short);
|
||||
internal static Type DecType = typeof(decimal);
|
||||
internal static Type StringType = typeof(string);
|
||||
internal static Type DateType = typeof(DateTime);
|
||||
internal static Type ByteArrayType = typeof(byte[]);
|
||||
internal static Type ModelType= typeof(ModelContext);
|
||||
internal static Type DicSS = typeof(KeyValuePair<string, string>);
|
||||
internal static Type DicSi = typeof(KeyValuePair<string, int>);
|
||||
internal static Type Dicii = typeof(KeyValuePair<int, int>);
|
||||
internal static Type DicIS = typeof(KeyValuePair<int, string>);
|
||||
internal static Type DicSi = typeof(KeyValuePair<string, int>);
|
||||
internal static Type DicSS = typeof(KeyValuePair<string, string>);
|
||||
internal static Type DicOO = typeof(KeyValuePair<object, object>);
|
||||
internal static Type DicSo = typeof(KeyValuePair<string, object>);
|
||||
internal static Type DicIS = typeof(KeyValuePair<int, string>);
|
||||
internal static Type DicArraySS = typeof(Dictionary<string, string>);
|
||||
internal static Type DicArraySO = typeof(Dictionary<string, object>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user