You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should collectionName in DbConnection.GetSchema(string collectionName) be case insensitive?
I didn't find any document of ado.net of that, but seems some other provider like SqlClient, Npgsql, Mysql.Data treat it as case insensitive.
SqlClient: Check with ADP.CompareInsensitiveInvariant(the same as string.Equals(a, b, StringComparison.InvariantCultureIgnoreCase)), match case-sensitive first(?looks like something wrong in the logic) and fallback to case-insensitive version if not found;
The text was updated successfully, but these errors were encountered:
bgrainger
changed the title
[Question]Should collectionName in DbConnection.GetSchema(string collectionName) be case insensitive?
MySqlConnection.GetSchema(string collectionName) should be case insensitive
Jul 20, 2020
Should
collectionName
in DbConnection.GetSchema(string collectionName) be case insensitive?I didn't find any document of ado.net of that, but seems some other provider like SqlClient, Npgsql, Mysql.Data treat it as case insensitive.
SqlClient: Check with
ADP.CompareInsensitiveInvariant
(the same asstring.Equals(a, b, StringComparison.InvariantCultureIgnoreCase)
), match case-sensitive first(?looks like something wrong in the logic) and fallback to case-insensitive version if not found;https://github.com/dotnet/SqlClient/blob/master/src/Microsoft.Data.SqlClient/netcore/src/Common/src/Microsoft/Data/ProviderBase/DbMetaDataFactory.cs#L268
Npsql/Mysql.Data: Use
string.ToUpperInvariant()
directly;https://github.com/npgsql/npgsql/blob/a9cab33e4d3a384cbcc05c1bd78c2bf6b80bd314/src/Npgsql/NpgsqlSchema.cs#L25
https://github.com/mysql/mysql-connector-net/blob/68c54371821c87ff40a773acc127ce357b46a5ae/Source/MySql.Data/SchemaProvider.cs#L57
MySqlConnector:
v1.0.0
The text was updated successfully, but these errors were encountered: