mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-25 10:08:11 +08:00
Update Core
This commit is contained in:
parent
5e23939a7c
commit
8dfc9bc135
@ -176,7 +176,8 @@ namespace SqlSugar
|
|||||||
MethodInfo method = null;
|
MethodInfo method = null;
|
||||||
Type bindPropertyType = UtilMethods.GetUnderType(columnInfo.PropertyInfo, ref isNullableType);
|
Type bindPropertyType = UtilMethods.GetUnderType(columnInfo.PropertyInfo, ref isNullableType);
|
||||||
string dbTypeName = UtilMethods.GetParenthesesValue(DataRecord.GetDataTypeName(ordinal));
|
string dbTypeName = UtilMethods.GetParenthesesValue(DataRecord.GetDataTypeName(ordinal));
|
||||||
if (dbTypeName.IsNullOrEmpty()) {
|
if (dbTypeName.IsNullOrEmpty())
|
||||||
|
{
|
||||||
dbTypeName = bindPropertyType.Name;
|
dbTypeName = bindPropertyType.Name;
|
||||||
}
|
}
|
||||||
string propertyName = columnInfo.PropertyName;
|
string propertyName = columnInfo.PropertyName;
|
||||||
@ -264,7 +265,8 @@ namespace SqlSugar
|
|||||||
method = isNullableType ? getConvertDouble : getDouble;
|
method = isNullableType ? getConvertDouble : getDouble;
|
||||||
else
|
else
|
||||||
method = isNullableType ? getConvertFloat : getFloat;
|
method = isNullableType ? getConvertFloat : getFloat;
|
||||||
if (dbTypeName.Equals("float",StringComparison.CurrentCultureIgnoreCase) && isNullableType && bindProperyTypeName.Equals("single",StringComparison.CurrentCultureIgnoreCase)) {
|
if (dbTypeName.Equals("float", StringComparison.CurrentCultureIgnoreCase) && isNullableType && bindProperyTypeName.Equals("single", StringComparison.CurrentCultureIgnoreCase))
|
||||||
|
{
|
||||||
method = getConvertDoubleToFloat;
|
method = getConvertDoubleToFloat;
|
||||||
}
|
}
|
||||||
if (bindPropertyType == UtilConstants.DecType)
|
if (bindPropertyType == UtilConstants.DecType)
|
||||||
|
@ -311,6 +311,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
addValue = Convert.ToInt32(addValue);
|
addValue = Convert.ToInt32(addValue);
|
||||||
}
|
}
|
||||||
|
else if (UtilMethods.GetUnderType(item.PropertyType) == UtilConstants.LongType)
|
||||||
|
{
|
||||||
|
addValue = Convert.ToInt64(addValue);
|
||||||
|
}
|
||||||
result.Add(name, addValue);
|
result.Add(name, addValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,12 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public partial class OracleMethod : DefaultDbMethod, IDbMethods
|
public partial class OracleMethod : DefaultDbMethod, IDbMethods
|
||||||
{
|
{
|
||||||
|
public override string ToInt64(MethodCallExpressionModel model)
|
||||||
|
{
|
||||||
|
var parameter = model.Args[0];
|
||||||
|
return string.Format(" CAST({0} AS Number)", parameter.MemberName);
|
||||||
|
}
|
||||||
|
|
||||||
public override string ToTime(MethodCallExpressionModel model)
|
public override string ToTime(MethodCallExpressionModel model)
|
||||||
{
|
{
|
||||||
var parameter = model.Args[0];
|
var parameter = model.Args[0];
|
||||||
|
@ -73,7 +73,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
else if (name.Contains("("))
|
else if (name.Contains("("))
|
||||||
{
|
{
|
||||||
return name.ToLower();
|
return name;
|
||||||
}
|
}
|
||||||
else if (name.Contains(SqlTranslationLeft) && name.Contains(SqlTranslationRight))
|
else if (name.Contains(SqlTranslationLeft) && name.Contains(SqlTranslationRight))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user