Skip to content

Refactor the SlimdumpCommand, DumpTask and Dumper classes #93

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

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

mpdude
Copy link
Member

@mpdude mpdude commented Sep 2, 2022

This PR contains a few refactorings that make the SlimdumpCommand, DumpTask and Dumper classes and method signatures more straightforward:

  • By creating the MysqlOutputFormatDriver in SlimdumpCommand, we can pass it the necessary information from command line switches directly. No need to pass-through these flags and settings through other classes/methods.
  • Separate the OutputInterface given to MysqlOutputFormatDriver (for writing out SQL) from the OutputInterface passed to Dumper (where it is used to output progress information)
  • Use a NullOutput for the progress-related OutputInterface instead of passing a $noProgress boolean through several methods. Saves us a bunch of if-conditionals.
  • "Extract method" refactorings for some meaningful chunks of code

@mpdude mpdude force-pushed the refactor-dumper-simple branch from be27203 to 3b7b9a9 Compare September 2, 2022 09:45
@mpdude mpdude force-pushed the refactor-dumper-simple branch from 3b7b9a9 to d0ee886 Compare September 2, 2022 09:45
@mpdude mpdude merged commit 819c4f7 into master Sep 2, 2022
@mpdude mpdude deleted the refactor-dumper-simple branch September 2, 2022 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants