-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add ADO.NET support for Utf8String #28966
Comments
Note that
Thanks for suggesting this particular addition. As we did with span, as an initial starting point, rather than opening individual issues for each possible place that Utf8String might be useful, I personally think it'd be better if someone (@GrabYourPitchforks?) went through the core frameworks and proposed a summary for all of the initial places we'd want to see Utf8String exposed (and why); that can then be discussed and reviewed holistically rather than piecemeal. |
I agree with @stephentoub. We have some ideas on what might benefit from being enlightened about any new types, but I haven't gotten around to publishing that document yet because it needs significant cleanup. One thing we'll really need to be mindful of is that we don't just take this type and splat it everywhere thoughout the Framework. It instead should have some sort of measurable value. As a concrete example, we've been playing with the idea of a modified Utf8Regex class that would support UTF-8 only. It would not be bolted on to the existing Regex class (which is implemented in terms of String all the way down), as doing so would probably not get the performance gains we want. I mention this in the context of the work item proposed here because it has similar performance concerns. In the This doesn't mean that |
I'm going to close this in the meantime. This can/should be factored in when doing the all-up analysis. Thanks! |
Utf8String
is being added to .NET: #933 dotnet/corefx#35989There may be opportunities to use this type in the ADO.NET API, particularly for database protocols/providers that use UTF-8 on the wire.
The most obvious enhancement seems like:
Perhaps less realistically, a new
DbCommand.CommandTextUtf8
property could be added, which would be preferred overDbCommand.CommandText
if it were set.Finally, implementations should be encouraged to support an
Utf8String
as the value ofDbParameter.Value
.Are there any other opportunities or easy wins?
Related: #28135, mysql-net/MySqlConnector#618
The text was updated successfully, but these errors were encountered: