-
Notifications
You must be signed in to change notification settings - Fork 332
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
Async resultset and database schema APIs #835
Comments
Updated API proposal at dotnet/runtime#38028 (comment). |
@bgrainger I've just merged dotnet/runtime#39098 for async schema APIs. If your implementation is sync in any case, there's no real reason to do anything on your side - the new System.Data APIs automatically fall back to their sync counterparts. Though I'm curious why these can only be synchronous on MySQL, is there no network involved? |
@roji When a query is executed, MySQL Server sends the column metadata (for each column in the result set) as the initial response, so this information is always available by the time |
@bgrainger what about DbConnection.GetSchemaTable, which is supposed to provide the list of tables/columns/views/etc? For the DbDataReader, the standard seems to be to expose the minimal information that's provided by the server, but if CommandBehavior.KeyInfo is specified on the command, to possibly go back to the database and retrieve any extra information via another query. No idea whether that makes sense for MySQL or not... |
At least for Npgsql, PostgreSQL doesn't send a lot of information with standard resultsets, so I use KeyInfo is an indicator that the user wants me to query additional info from the database. I can provide more details (the relevant file is DbColumnSchemaGenerator). |
@roji I was speaking specifically about |
Oh I see, thanks for clarifying. Does it make sense to open a separate issue to track implementing DbConnection.GetSchemaTable, or should this one be used (having "database schema" in the title)? |
I conflated them into this issue. The (async) MySqlConnector/src/MySqlConnector/MySqlConnection.cs Lines 537 to 562 in bb39cd8
I'll probably update that code with |
Sounds good. |
API proposal at dotnet/runtime#38028.
Note that
GetSchemaTableAsync
andGetColumnSchemaAsync
will always run synchronously in MySqlConnector; this should be called out in the documentation.The text was updated successfully, but these errors were encountered: