-
Notifications
You must be signed in to change notification settings - Fork 282
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
SqlClient implementation and API is not complete in Core #17
Comments
SqlBulkCopy WriteToServer* methods are being added in this PR: |
Hit this omission when trying to convert the desktop build of https://github.com/StackExchange/Dapper (one of the top 100 nuget libraries);
|
@danmosemsft Does this report only show the missing methods of existing types common to Core and Desktop ? I dont see a few types which are missing like |
@saurabh500 you can see the full diff between (selected part of) Desktop and Core in this file. https://github.com/dotnet/corefx/blob/master/src/shims/ApiCompatBaseline.netcoreapp.netfx461.txt In the list above, I've only looked at missing members. Missing Types are generally not as interesting as explained above -- we can in theory add them separately. Certainly it would be great to bring back many of those missing types, perhaps driven by our usage data, user reports, conversion experiences, etc. |
In fact, given this is now post 2.0, I'd say members and types are equally interesting. |
Update from today, 65 missing members (instead of 75 from above): UPDATE: Original list replaced by newer one at the top of the thread!
|
Here is the full list including types of API that's in SqlClient on desktop but not on Core. Would we aspire to port all these? UPDATE: List moved to top-post |
|
This adds a netstandard2.0 build to Dapper (and StrongName until v2), adds a netstandard2.0 test lineup, restores most functionality (except UDTs for SQL, e.g. .UdtTypeName isn't in netstandard2), and also breaks things not actually implemented or implemented correctly in netstandard2.0. Pushing this up so we can work through these with the .NET teams. Several things are still broken here (and fail tests): - Parameter decimal values (not filed yet) - DataTables as parameters (https://github.com/dotnet/corefx/issues/19708) - .GetSchemaTable() (not yet filed, implementation is completely missing from SqlDataReader in CoreFX) While the compile is clean, the above are runtime issues. `SqlParameter.UdtTypeName` is a separate issue, that one just wasn't in `netstandard2.0` at all...so we can't support UDTs there until it is. See https://github.com/dotnet/corefx/issues/17126 for details.
@saurabh500 @corivera @divega is it something we should add into Core 2.0? |
Here are the members missing from Core that are overrides. I didn't list them above as they're not relevant to API compat. However, when they're missing it can suggest implementation is missing. UPDATE: List moved to top-post |
The lists above are large enough that we should basically consider SqlClient incomplete and decide whether we want it to be complete (or if not exactly which part is supported) rather than adding in API piecewise from these lists. |
I went through these vs. reference source, can nuke these from the list (they aren't overridden in NetFx):
|
Can also remove |
I updated all the lists and merged them into master list in top post with help from @ViktorHofer. |
AFAIR, |
@karelz @danmosemsft is there a similar list for System.Data.Common or are those APIs complete? |
@divega's API moved into "By Design missing" section. |
All other members/types missing:
|
@ViktorHofer just to make sure, are you saying this list + the list at the top are the full API diff? From what I know, the whole of System.Data.Odbc is still missing (although the code was ported, I believe we are not producing the package). It might help me understand if I knew exactly are you diffing and excluding. |
I updated the above list. This should now be the full diff between netcoreapp20 and netfx461. Please excuse the mixed formatting. |
We ignored TypesMustExist errors in other namespaces as they weren't goal NS2.0.
This is the raw output we use for our validation. |
I have created a Gist, categorizing the buckets/scenarios for most of the Types/Methods/Properties which are missing. I am going by the list in the original issue at top. https://gist.github.com/saurabh500/011e90da4ac77d879ea74980fa6fcfae |
how about giving this SqlClient implementation a tfm of netcoreapp2.0 instead of netstandard2.0, so that people don't accidentally try to use the less-capable one on netfx and get runtime errors? |
The netstandard20 surface is implemented, this issue is about differences between netcoreapp20 and netfx461 which doesn't necessarily mean we need to support all of them but for compatibility reasons it makes sense to support as many as possible. We have some APIs which were left out intentionally as they don't make sense in Core. |
@gulbanana do you mean that SqlClient targets netcoreapp20 instead of netstandard2.0? |
I'm getting errors in trying to port code to .NET Standard 2.0 saying that Can someone confirm if it is indeed missing from .NET Standard 2.0? |
@MgSam is it not part of .NET Standard 2.0 itself, however it is implemented in a package that is .NET Standard 2.0 compatible. |
@joelbraun we never asked whether you would like to port more - any interest? |
@danmosemsft Sure, I've got some free time again. What features do you want me to look into porting over next? |
@joelbraun May I suggest |
@danmosemsft @saurabh500 Can you update\show little roadmap for this issue? I wanna continue contribute while my previous PR on review |
@David-Engel @keeratsingh @afsanehr should be able to comment on plans here |
@karelz Anyone saw them? |
There is internal discussion with Sql team. It is holiday season now, so expect delayed answers :( ... |
As recently announced in the .NET Blog, focus on new SqlClient features an improvements is moving to the new Microsoft.Data.SqlClient package. For this reason, we are moving this issue to the new repo at https://github.com/dotnet/SqlClient. We will still use https://github.com/dotnet/corefx to track issues on other providers like System.Data.Odbc and System.Data.OleDB, and general ADO.NET and .NET data access issues. |
To reflect the current state of the API, here is a list of classes, enums and members that exists in .NET Framework on System.Data.SqlClient and that are missing in .NET Core's version of Microsoft.Data.SqlClient:
I have omitted from the diff APIs that are obsolete in .NET Framework and those that depend on System.Configuration, XML serialization, etc. |
@divega Assume this reflects the current status of the .NET Core 3.0 bits? |
@ErikEJ, it should reflect the latest public preview of Microsoft.Data.SqlClient. |
I downloaded the latest preview 1.1.0-preview1.19275.1 and did not see SqlDataSourceEnumerator. |
@dgxhubbard SqlDataSourceEnumerator is not in .NET Core yet. Below is the updated table of classes and properties that exists in .NET Framework but lacking in .NET Core:
|
+1 to |
I have come back to my project and this issue - Is there any ETA on SqlDataSourceEnumerator? What would be the difficulty in implementing it? Thanks 😃 |
Hi @LukeTOBrien We did a quick investigation before but the original implementation of |
Okey dokey thanks for letting me know
…On Fri, Jul 10, 2020 at 8:53 PM Cheena Malhotra ***@***.***> wrote:
Hi @LukeTOBrien <https://github.com/LukeTOBrien>
We did a quick investigation before but the original implementation is
tied to native C++ APIs which are not exposed in our current SNI DLLs.
Since our goal is to move away from Native Code, we have to come up with
Managed Code counterparts. It's in our backlog queue and will be picked up
as and when prioritized.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3KMFNHSM6USDFYA6OTJGTR25WTNANCNFSM4HNHTONQ>
.
|
For anyone looking for a "in the mean time" solution to SqlDataSourceEnumerator, I've created a repository here : Sql Browser Client with a UDP broadcast solution. |
FWIW, SqlDataSourceEnumerator is implemented in Microsoft.Data.SqlClient v5.0 and later. It's in the Microsoft.Data.Sql namespace now. |
The following members are on types implemented in .NET Core. However these particular members are missing, although they are present on Desktop.
The problem with this situation is
No work is necessarily required here for 2.0. It's not part of NS2.0. I didn't look at usage data. I'm just flagging this so we're doing this consciously.
[benrr101] Updating in 2024, note that SqlClient is now Microsoft.Data.SqlClient
Missing APIs List (as of 04/03/2024)
- Added circa 04/2020T:System.Data.SqlClient.OnChangeEventHandler
- Added circa 06/2020T:System.Data.SqlClient.PoolBlockingPeriod
- Added circa 08/2019T:System.Data.SqlClient.SqlAuthenticationMethod
- Added circa 10/2021M:System.Data.SqlClient.SqlBulkCopyColumnMappingCollection.Clear
- Added circa 10/2021M:System.Data.SqlClient.SqlBulkCopyColumnMappingCollection.RemoveAt(Int32)
- Added circa 04/2020F:System.Data.SqlClient.SqlBulkCopyOptions.AllowEncryptedValueModifications
M:System.Data.SqlClient.SqlClientFactory.GetService(Type)
- Added 08/2019M:System.Data.SqlClient.SqlClientFactory.CreateCommandBuilder
M:System.Data.SqlClient.SqlClientFactory.CreateDataSourceEnumerator
M:System.Data.SqlClient.SqlClientFactory.CreatePermission(PermissionState)
P:System.Data.SqlClient.SqlClientFactory.CanCreateDataSourceEnumerator
M:System.Data.SqlClient.SqlClientPermission.Add(String,String,KeyRestrictionBehavior)
M:System.Data.SqlClient.SqlClientPermission.Copy
M:System.Data.SqlClient.SqlClientPermissionAttribute.CreatePermission
- Added circa 09/2021T:System.Data.SqlClient.SqlClientMetaDataCollectionNames
- Added circa 08/2019T:System.Data.SqlClient.SqlColumnEncryptionCertificateStoreProvider
- Added circa 08/2019T:System.Data.SqlClient.SqlColumnEncryptionCngProvider
- Added circa 08/2019T:System.Data.SqlClient.SqlColumnEncryptionCspProvider
- Added circa 04/2020T:System.Data.SqlClient.SqlColumnEncryptionKeyStoreProvider
- Added circa 08/2019P:System.Data.SqlClient.SqlCommand.ColumnEncryptionSetting
- Added circa 08/2019P:System.Data.SqlClient.SqlCommand.Notification
P:System.Data.SqlClient.SqlCommand.NotificationAutoEnlist
- Added circa 01/2021M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery
- Added circa 08/2019M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery(AsyncCallback,Object)
- Added circa 08/2019M:System.Data.SqlClient.SqlCommand.BeginExecuteReader
- Added circa 08/2019M:System.Data.SqlClient.SqlCommand.BeginExecuteReader(AsyncCallback,Object)
- Added circa 03/2020M:System.Data.SqlClient.SqlCommand.BeginExecuteReader(AsyncCallback,Object,CommandBehavior)
- Added circa 01/2021M:System.Data.SqlClient.SqlCommand.BeginExecuteReader(CommandBehavior)
- Added circa 08/2019M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader
- Added circa 08/2019M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader(AsyncCallback,Object)
- Added circa 03/2020M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult)
- Added circa 08/2019M:System.Data.SqlClient.SqlCommand.EndExecuteReader(IAsyncResult)
- Added circa 08/2019M:System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(IAsyncResult)
- Added circa 08/2019M:System.Data.SqlClient.SqlCommand.ResetCommandTimeout
- Added circa 10/2021T:System.Data.SqlClient.SqlCommandBuilder
- Added circa 04/2022T:System.Data.SqlClient.SqlCommandColumnEncryptionSetting
- Added circa 08/2019M:System.Data.SqlClient.SqlConnection.#ctor(String,SqlCredential)
- Added circa 08/2019P:System.Data.SqlClient.SqlSonnection.AccessToken
- Added circa 08/2019P:System.Data.SqlClient.SqlConnection.ColumnEncryptionKeyCacheTtl
- Added circa 08/2019P:System.Data.SqlClient.SqlConnection.ColumnEncryptionQueryMetadataCacheEnabled
- Added circa 08/2019P:System.Data.SqlClient.SqlConnection.ColumnEncryptionTrustedMasterKeyPaths
- Added circa 08/2019P:System.Data.SqlClient.SqlConnection.Credential
- Added circa 08/2019M:System.Data.SqlClient.SqlConnection.ChangePassword(String,SqlCredential,SecureString)
- Added circa 08/2019M:System.Data.SqlClient.SqlConnection.ChangePassword(String,String)
M:System.Data.SqlClient.SqlConnection.EnlistDistributedTransaction(System.EnterpriseServices.ITransaction)
- Added circa 08/2019M:System.Data.SqlClient.SqlConnection.GetSchema
- Added circa 08/2019M:System.Data.SqlClient.SqlConnection.GetSchema(String)
- Added circa 08/2019M:System.Data.SqlClient.SqlConnection.GetSchema(String,String[])
- Added circa 08/2019M:System.Data.SqlClient.SqlConnection.RegisterColumnEncryptionKeyStoreProviders(IDictionary{String,SqlColumnEncryptionKeyStoreProvider})
- Added circa 04/2022T:System.Data.SqlClient.SqlConnectionColumnEncryptionSetting
- Removed from netfxP:System.Data.SqlClient.SqlConnectionStringBuilder.AsynchronousProcessing
- Added circa 10/2021P:System.Data.SqlClient.SqlConnectionStringBuilder.Authentication
- Added circa 10/2021P:System.Data.SqlClient.SqlConnectionStringBuilder.ColumnEncryptionSetting
- Obsolete in netfxP:System.Data.SqlClient.SqlConnectionStringBuilder.ConnectionReset
- Obsolete in netfxP:System.Data.SqlClient.SqlConnectionStringBuilder.ContextConnection
- Added circa 10/2021P:System.Data.SqlClient.SqlConnectionStringBuilder.Enlist
- Added circa 10/2021P:System.Data.SqlClient.SqlConnectionStringBuilder.IsFixedSize
P:System.Data.SqlClient.SqlConnectionStringBuilder.NetworkLibrary
- Added circa 10/2021P:System.Data.SqlClient.SqlConnectionStringBuilder.PoolBlockingPeriod
- Added circa 10/2021P:System.Data.SqlClient.SqlConnectionStringBuilder.TransactionBinding
P:System.Data.SqlClient.SqlConnectionStringBuilder.TransparentNetworkIPResolution
- Added circa 08/2019T:System.Data.SqlClient.SqlCredential
- Added circa 10/2021P:System.Data.SqlClient.SqlDataAdapter.UpdateBatchSize
- Added circa 08/2019M:System.Data.SqlClient.SqlDataReader.Close
M:System.Data.SqlClient.SqlDataReader.GetData(Int32)
- Added circa 08/2019M:System.Data.SqlClient.SqlDataReader.GetSchemaTable
- Added circa 08/2019M:System.Data.SqlClient.SqlDataReader.IsCommandBehavior(CommandBehavior)
T:System.Data.SqlClient.SQLDebugging
- Added circa 10/2021T:System.Data.SqlClient.SqlDependency
- Added circa 10/2021T:System.Data.SqlClient.SqlNotificationEventArgs
- Added circa 04/2020T:System.Data.SqlClient.SqlNotificationInfo
- Added circa 04/2020T:System.Data.SqlClient.SqlNotificationType
- Added circa 03/2021M:System.Data.SqlClient.SqlParameter.#ctor(String,SqlDbType,Int32,ParameterDirection,Boolean,Byte,Bute,String,DataRowVersion,Object)
- Added circa 06/2022M:System.Data.SqlClient.SqlParameter.#ctor(String,SqlDbType,Int32,ParameterDirection,Byte,Byte,String,DataRowVersion,Boolean,Object,String,String,String)
- Added circa 06/2022M:System.Data.SqlClient.SqlParameter.ForceColumnEncryption
- Added circa 03/2021M:System.Data.SqlClient.SqlParameter.UdtTypeName
- Removed from netfxM:System.Data.SqlClient.SqlParameterCollection.Add(String,Object)
- Added circa 03/2021M:System.Data.SqlClient.SqlParameterCollection.Add(String,SqlDbType,Int32,String)
Old Missing APIs List
Missing APIs
By Design missing
T:System.Data.SqlClient.SqlProviderServices
- It is part of the EF provider model for old versions of EF that were part of .NET Framework. - see https://github.com/dotnet/corefx/issues/17126#issuecomment-301640792Missing overrides
These were removed based on further investigation:
These were already fixed:
M:System.Data.SqlClient.SqlClientFactory.CreateDataAdapter
- dotnet/corefx@88f562cOriginal obsolete list:
from https://github.com/dotnet/corefx/blob/master/src/shims/ApiCompatBaseline.netcoreapp.netfx461.txt
The text was updated successfully, but these errors were encountered: