mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-02 20:02:47 +08:00
Update oracle
This commit is contained in:
parent
bddc67fb6c
commit
a611ecdc5d
@ -164,16 +164,8 @@ namespace SqlSugar
|
||||
}
|
||||
else if (parameter.DbType == System.Data.DbType.DateTime)
|
||||
{
|
||||
if (this.Context.SugarActionType == SugarActionType.Insert)
|
||||
{
|
||||
sqlParameter.Value = parameter.Value;
|
||||
sqlParameter.DbType = System.Data.DbType.DateTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlParameter.Value = parameter.Value;
|
||||
sqlParameter.DbType = System.Data.DbType.Date;
|
||||
}
|
||||
sqlParameter.Value = parameter.Value;
|
||||
sqlParameter.DbType = System.Data.DbType.DateTime;
|
||||
}
|
||||
else if (parameter.DbType == System.Data.DbType.AnsiStringFixedLength)
|
||||
{
|
||||
|
@ -70,15 +70,15 @@ namespace SqlSugar
|
||||
case DateType.Month:
|
||||
return $" ( cast((months_between( {end} , {begin})) as number(9,0) ) )";
|
||||
case DateType.Day:
|
||||
return $" ( ROUND(TO_NUMBER({end} - {begin})) )";
|
||||
return $" ( ROUND(TO_NUMBER(cast({end} as date) - cast({begin} as date))) )";
|
||||
case DateType.Hour:
|
||||
return $" ( ROUND(TO_NUMBER({end} - {begin}) * 24) )";
|
||||
return $" ( ROUND(TO_NUMBER(cast({end} as date) - cast({begin} as date)) * 24) )";
|
||||
case DateType.Minute:
|
||||
return $" ( ROUND(TO_NUMBER({end} - {begin}) * 24 * 60) )";
|
||||
return $" ( ROUND(TO_NUMBER(cast({end} as date) - cast({begin} as date)) * 24 * 60) )";
|
||||
case DateType.Second:
|
||||
return $" ( ROUND(TO_NUMBER({end} - {begin}) * 24 * 60 * 60) )";
|
||||
return $" ( ROUND(TO_NUMBER(cast({end} as date) - cast({begin} as date)) * 24 * 60 * 60) )";
|
||||
case DateType.Millisecond:
|
||||
return $" ( ROUND(TO_NUMBER({end} - {begin}) * 24 * 60 * 60 * 60) )";
|
||||
return $" ( ROUND(TO_NUMBER(cast({end} as date) - cast({begin} as date)) * 24 * 60 * 60 * 60) )";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user