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 batch command API #637

Merged
merged 14 commits into from
Jun 23, 2019
Merged

Add batch command API #637

merged 14 commits into from
Jun 23, 2019

Conversation

bgrainger
Copy link
Member

@bgrainger bgrainger commented May 15, 2019

Implements the API from https://github.com/dotnet/corefx/issues/35135.

Further work is tracked by #655 and #656.

Introduced IMySqlCommand abstraction for commands and batch commands. Replaced PreparedStatementCommandExecutor with ICommandPayloadCreator and a new mechanism for executing commands in a loop. MySqlDataReader can iterate over multiple commands and return multiple result sets.

Many features for batched commands are not yet implemented but the basic framework is now in place and can be extended.

Signed-off-by: Bradley Grainger <[email protected]>
Conventionally, most types in MySqlConnector do not include "Db" in their name.

Signed-off-by: Bradley Grainger <[email protected]>
The batch execution infrastructure permits a single MySqlDataReader to loop over multiple separate commands.

Signed-off-by: Bradley Grainger <[email protected]>
These are currently too flaky for CI builds.

Signed-off-by: Bradley Grainger <[email protected]>
Signed-off-by: Bradley Grainger <[email protected]>
Signed-off-by: Bradley Grainger <[email protected]>
These are now executed through the new batch execution pipeline.

Signed-off-by: Bradley Grainger <[email protected]>
Signed-off-by: Bradley Grainger <[email protected]>
The only CommandBehavior value that is currently handled is CommandBehavior.CloseConnection, which isn't valid inside a batch.

Signed-off-by: Bradley Grainger <[email protected]>
Prepared batch commands will be implemented later.

Signed-off-by: Bradley Grainger <[email protected]>
@bgrainger bgrainger merged commit 1ddaa43 into master Jun 23, 2019
@bgrainger bgrainger deleted the batch-commands branch June 23, 2019 15:50
@roji
Copy link

roji commented Jun 24, 2019

👍

Looking forward to hearing results :)

@bgrainger
Copy link
Member Author

Still needs some more work (#656, #657), but this PR had successfully reimplemented non-batched commands using the new command execution system, so it seemed ready to merge.

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.

2 participants