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

[+] Modifications on MySQLDatabaseGateway & added a SQL Script #62

Merged
merged 5 commits into from
Nov 30, 2022
Merged

Conversation

Lei-Tin
Copy link
Collaborator

@Lei-Tin Lei-Tin commented Nov 24, 2022

Modifications:

  • Returns null for the methods: getUserData and getEntryData, both of which is returned when we cannot find the specified username / entry_id in the given bill.
  • Added a SQL Script that generates a sample bill table, can be modified so that we can use this to append the information to any bill table we wish. Now, running this script creates a table called bill_999 and it contains some of the example entries that I have created. This can be used for demonstration purposes.

The data that will be generated is shown in the picture below:
image

Modifications (As of November 28), Part 2:

  • Modified MySQLDatabaseGateway so that it incorporates another version of most functionalities, but dedicated for the splitEntry version.
  • Added a QuerySplitEntryData class that is used specifically for split entries
  • Made QuerySplitEntryData and QueryEntryData both inherit from QueryEntry, which fixes some code smell
  • Fixed some small typos and some parts where I actually called INSERT INTO bill_{user_id}{split_bill_id}

Updated split bill data structure:
Now: All of the split bill will have the bill name being
bill_{user_id}_{split_bill_id}

And for the table structure, it is the same as previously defined.

@Lei-Tin Lei-Tin added the enhancement New feature or request label Nov 24, 2022
@Lei-Tin Lei-Tin self-assigned this Nov 24, 2022
…to handle both the split bill case and the regular case. Added new classes that takes care of the Split Entries
@Lei-Tin Lei-Tin marked this pull request as ready for review November 29, 2022 00:35
Copy link
Contributor

@CharlotteChenyy CharlotteChenyy left a comment

Choose a reason for hiding this comment

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

👍👍👍

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.

The Javadoc in the beginning of each file could be more specific on how this chunk of code works.

Overall good(=•ェ•=)

@xgao28 xgao28 removed their assignment Nov 30, 2022
@Lei-Tin Lei-Tin merged commit 21c6027 into main Nov 30, 2022
@ScottCTD ScottCTD deleted the ray branch December 4, 2022 16:28
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.

[Improvement] Return values of methods in DatabaseGateway could be useful.
3 participants