This is a general update to the MySQLDatabaseGateway class. Where I attemped to fix several bugs that I didn't notice before, and created a full test suite.
Updated information includes:
Created a full test suite for MySQLDatabaseGateway
Modified QueryEntryData to support the new attribute splitBillID
Modified MySQLDatabaseGateway to support the new attribute splitBillID
Fixed convention on the table name with respect to bills, now it is bill%d. E.g. bill1, bill2, bill3, etc.
Fixed a small bug where reading SQL Timestamps gives EpochMilliseconds but can only store up until EpochSeconds. Now the QueryEntryData class forces the date inputted to it to only store up until seconds.
Fixed a bug in insertEntry method under MySQLDatabaseGateway, where it actually doesn't insert the entry id according to the entry_id of the QueryEntryData parameter provided, so now it actually inserts the entry with its respective ID.
CAUTION
Do not attempt to run the test suite too often, as it involves A LOT of database manipulation queries. To be specified, every time the test suite is ran, for each test case, we will create a temporary bill and insert 2 entries in there. Therefore, running this test suite too often may cause potential issues with the Azure server of Scott.
Side note
I'm still trying to get the autograder on GitHub to work, we will see about that in a few days
-- Update
I have figured out the test case issue, and I have already included the changes in gradle within this Pull Request!
This is a general update to the
MySQLDatabaseGateway
class. Where I attemped to fix several bugs that I didn't notice before, and created a full test suite.Updated information includes:
MySQLDatabaseGateway
QueryEntryData
to support the new attributesplitBillID
MySQLDatabaseGateway
to support the new attributesplitBillID
bill%d
. E.g. bill1, bill2, bill3, etc.EpochMilliseconds
but can only store up untilEpochSeconds
. Now theQueryEntryData
class forces the date inputted to it to only store up until seconds.insertEntry
method underMySQLDatabaseGateway
, where it actually doesn't insert the entry id according to theentry_id
of theQueryEntryData
parameter provided, so now it actually inserts the entry with its respective ID.CAUTION
Do not attempt to run the test suite too often, as it involves A LOT of database manipulation queries. To be specified, every time the test suite is ran, for each test case, we will create a temporary bill and insert 2 entries in there. Therefore, running this test suite too often may cause potential issues with the Azure server of Scott.
Side note
I'm still trying to get the autograder on GitHub to work, we will see about that in a few days
-- Update I have figured out the test case issue, and I have already included the changes in
gradle
within this Pull Request!