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

Cleanup the API #14

Merged
merged 10 commits into from
Feb 28, 2023
Merged

Cleanup the API #14

merged 10 commits into from
Feb 28, 2023

Conversation

adamziel
Copy link
Collaborator

Description

Builds on top of (and contains) #13

This PR:

  • Executes SQL queries alongside the translation. Translation often requires executing one or more intermediary queries so it doesn't make sense to separate the translation step and an execution step.
  • Removes the translate() method.
  • Removes all unused properties and methods.
  • Splits a large execute_crud method into specialized execute_select, execute_delete, execute_update, execute_insert_or_replace
  • Surgically refactors the class here and there for more readability.

This PR can be merged after #12 and #13 OR instead of them – it contains changes from both.

WordPress PHPUnit report:

Tests: 15461, Assertions: 49519, Errors: 23, Failures: 34, Warnings: 60, Skipped: 60, Risky: 2.

cc @aristath

@aristath aristath merged commit c5567a7 into main Feb 28, 2023
@aristath aristath deleted the cleanup-translator-class branch February 28, 2023 12:21
@batonac batonac mentioned this pull request Jul 18, 2023
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