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

[*] Revamped MySQLDatabaseGateway and other major modifications to use cases #76

Merged
merged 7 commits into from
Dec 4, 2022

Conversation

Lei-Tin
Copy link
Collaborator

@Lei-Tin Lei-Tin commented Dec 3, 2022

Refer to this issue for the reason of this PR.

Database class modifications

  • Completely removed QueryEntryData and all the related classes with that, also removed QueryBillData with it
  • Modified EntryBuilder so that the date is truncated to seconds
  • Moved QueryUserData into entities
  • Modified DatabaseGateway so that it aligns with the new descriptions
  • Modified tests so that it works with the new modification

Use Case modifications

Fixed all use case issues.

Now that all use cases work with the new MySQLDatabaseGateway modifications

… they don't depend on QueryEntryData and QueryBillData anymore. All the "Intermediate" temporary classes are removed. Moved QueryUserData into Entities
@Lei-Tin Lei-Tin added the enhancement New feature or request label Dec 3, 2022
@Lei-Tin Lei-Tin requested a review from xgao28 December 3, 2022 01:44
@Lei-Tin Lei-Tin linked an issue Dec 3, 2022 that may be closed by this pull request
@Lei-Tin Lei-Tin changed the title [*] Revamped MySQLDatabaseGateway and other major modifications [*] Revamped MySQLDatabaseGateway and other major modifications to use cases Dec 3, 2022
…eption. Modified AlterEntryUseCase and related classes and methods to make avoid errors.
@Lei-Tin Lei-Tin requested a review from ScottCTD December 3, 2022 06:48
@Lei-Tin Lei-Tin marked this pull request as ready for review December 3, 2022 08:20
ScottCTD
ScottCTD previously approved these changes Dec 3, 2022
Copy link
Collaborator

@ScottCTD ScottCTD left a comment

Choose a reason for hiding this comment

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

Great refactors!

src/main/java/billgates/entities/EntryBuilder.java Outdated Show resolved Hide resolved
src/main/java/billgates/entities/User.java Outdated Show resolved Hide resolved
# Conflicts:
#	src/main/java/billgates/use_cases/bill_update/BillUpdateUseCase.java
Copy link
Contributor

@xgao28 xgao28 left a comment

Choose a reason for hiding this comment

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

Nice

Copy link
Collaborator

@ScottCTD ScottCTD left a comment

Choose a reason for hiding this comment

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

There are still tons of conflicts with newer PRs to be fixed.

However, let's merge this pr first.

@ScottCTD ScottCTD merged commit 371215a into main Dec 4, 2022
@ScottCTD ScottCTD deleted the database_gateway_dependency_change branch December 4, 2022 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Database Gateway should depend directly on Entities.
3 participants