Update oracle

This commit is contained in:
sunkaixuan
2025-05-27 12:31:44 +08:00
parent 7295341ac0
commit 003d9a2279
3 changed files with 21 additions and 1 deletions

View File

@@ -176,6 +176,16 @@ namespace SqlSugar
{ {
return Convert.ToInt64(value); return Convert.ToInt64(value);
} }
else if (value is TimeSpan ts)
{
return string.Format(
"INTERVAL '{0} {1:D2}:{2:D2}:{3:D2}.{4:D3}' DAY TO SECOND(3)",
ts.Days,
ts.Hours,
ts.Minutes,
ts.Seconds,
ts.Milliseconds);
}
else if (type == UtilConstants.ByteArrayType) else if (type == UtilConstants.ByteArrayType)
{ {
++i; ++i;

View File

@@ -106,6 +106,16 @@ namespace SqlSugar
{ {
return value.ObjToBool() ? "1" : "0"; return value.ObjToBool() ? "1" : "0";
} }
else if (value is TimeSpan ts)
{
return string.Format(
"INTERVAL '{0} {1:D2}:{2:D2}:{3:D2}.{4:D3}' DAY TO SECOND(3)",
ts.Days,
ts.Hours,
ts.Minutes,
ts.Seconds,
ts.Milliseconds );
}
else if (type == UtilConstants.DateTimeOffsetType) else if (type == UtilConstants.DateTimeOffsetType)
{ {
var date = UtilMethods.ConvertFromDateTimeOffset((DateTimeOffset)value); var date = UtilMethods.ConvertFromDateTimeOffset((DateTimeOffset)value);

View File

@@ -2,7 +2,7 @@
<package > <package >
<metadata> <metadata>
<id>SqlSugarCore</id> <id>SqlSugarCore</id>
<version>5.1.4.194-preview24</version> <version>5.1.4.194-preview28</version>
<authors>sunkaixuan</authors> <authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners> <owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl> <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>