Skip to content
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 support for DataSourceInformation Schema #795

Merged
merged 4 commits into from Apr 7, 2020

Conversation

vdaron
Copy link
Contributor

@vdaron vdaron commented Apr 5, 2020

Some progress on the #375 issue

vdaron added 2 commits Apr 5, 2020
Signed-off-by: Vincent DARON <vda@dfakto.com>
Signed-off-by: Vincent DARON <vda@dfakto.com>
Signed-off-by: Vincent DARON <vda@dfakto.com>

var row = dataTable.NewRow();
row["CompositeIdentifierSeparatorPattern"] = @"\.";
row["DataSourceProductName"] = "MysqlConnector";
Copy link
Member

@bgrainger bgrainger Apr 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataSourceProductName is "The name of the product accessed by the provider, such as 'Oracle' or 'SQLServer'." (https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/common-schema-collections)

I don't know if we can accurately determine the remote database (MySQL, Percona, MariaDB, Amazon, etc.) so it might be best to just return "MySQL".

@bgrainger
Copy link
Member

bgrainger commented Apr 5, 2020

Thanks for the contribution! I'll look over it shortly.

row["CompositeIdentifierSeparatorPattern"] = @"\.";
row["DataSourceProductName"] = "MysqlConnector";
row["DataSourceProductVersion"] = m_connection.ServerVersion;
row["DataSourceProductVersionNormalized"] = m_connection.Session.ServerVersion.Version.ToString();
Copy link
Member

@bgrainger bgrainger Apr 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A normalized version for the data source, such that it can be compared with String.Compare().

There would need to be some padding here (e.g., nn.nn.nnnn) to make sure 10 doesn't compare between 1 and 2.

Change DataSourceProductVersionNormalized to have a String Comparable result

Signed-off-by: Vincent DARON <vda@dfakto.com>
@bgrainger bgrainger merged commit d2abfc0 into mysql-net:master Apr 7, 2020
20 checks passed
@bgrainger
Copy link
Member

bgrainger commented Apr 10, 2020

Added in 0.63.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants