-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET 6 DateOnly and TimeOnly types #248
Comments
We're evaluating, but do not have any near term plans. We haven't seen too many people asking for these data types yet. If there are developers that want this feature, add a thumbs up emoji to the original request. |
The ER number is 34509986 for this feature request. |
Hi! some news?? |
I don't have a committed release vehicle yet for DateOnly and TimeOnly, but it is a feature the ODP.NET team definitely wants to do. When I have a planned milestone release, I will update this issue. There's a lot of major features coming out in the 23c ODP.NET release, such as async, OpenTelemetry, Application Continuity, AQ and Transactional Event Queues, JSON Relational Duality, cloud single sign-on and configuration management, etc. We weren't able to schedule these new types in for the initial 23c release. |
The Oracle .NET team has evaluated the DateOnly and TimeOnly features. Several questions came up in terms of how developers want to use these types with an Oracle database. It doesn't appear that direct use of these types is applicable for Oracle EF Core. MS has added mapping support for EF Core 8 as a SQL Server only feature by updating the default mapping for Date and Time to these data types. SQL Server has equivalent date only and time only types. Oracle database doesn’t have these specific types. The SQL server EF core provider does not allow DateOnly or TimeOnly to be retrieved from SQL Server dateTime. DateOnly/TimeOnly .NET types cannot be mapped to any of the following types other than “date” and “time” data types respectively: datetime, datetime2, datetimeoffset, and smalldatetime. PostgreSQL has date only and time only data types. They also have default mappings to DateOnly and TimeOnly for these types, respectively. From the SqlClient perspective (non-EF Core), it does not allow datetime to be retrieved as DateOnly or TimeOnly from the DataReader. If we use SqlClient reader.GetFieldValue() for a datetime column, then reader throws the InvalidCastException. We don’t see SQL Server nor Npgsql DataReader getters for DateOnly and TimeOnly in their respective doc. If you'd like ODP.NET to support DateOnly and TimeOnly, can you provide details about the specific functionality you are asking for? Do you see that equivalent functionality in other ADO.NET providers, such as SqlClient and Npgsql? Or is the request for DB level changes, such as the DB adding these DateOnly and TimeOnly data types as DB column and/or PL/SQL types? |
I don't currently have any active projects in Oracle. I asked because I maintain an OSS data library that supports SQL Server, Npgsql, Oracle and Sqlite. My intent was to research what I needed to implement to support Oracle. It sounds like I don't need to do anything (which is great for me). But I'm sure that other users will have more of an opinion. I will say that I do appreciate the ability to store |
@JordanMarr Thanks! Based on your feedback, your preference is end to end data type support in the DB and ODP.NET. |
Since this data type requires end to end DB and client support, the DB enhancement request number is 36197982. The ODP.NET ER is 34509986 as previously stated. Note the ODP.NET ER is dependent on the DB ER. |
Are the new .NET 6
DateOnly
andTimeOnly
types supported?(And if not, are there plans to support them?)
The text was updated successfully, but these errors were encountered: