-
Notifications
You must be signed in to change notification settings - Fork 9
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
Postgres mapper test and bugfixes #111
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New tests have been added for the `PostgresqlMapper` class in the "sadu-postgresql" project. These unit tests help in checking the parsing of different datasources, covering various classes and data types, and also verifying JSONB and JSON data parsing. This significantly improves the coverage for `PostgresqlMapper` and ensures its stability against future changes.
Aliases for various PostgreSQL data types have been added to clarify and strengthen data type mappings in the PostgreSqlTypes class. Updates include better representational alias for CHAR as 'bpchar', addition of 'float4' for REAL and expansion of SMALLINT mapping. New JSON and JSONB types have also been defined to support JSON data manipulation. This change bolsters data compatibility and accuracy across different PostgreSQL installations.
Updated the postgreSQLMapper and DefaultMapper classes to support additional PostgreSQL data types: Short and BigDecimal. Also added alias support for JSON and JSONB postgreSQL types and provided more clarity in the division between float and double types. These changes are necessary to increase accuracy when handling different types of data from a PostgreSQL database.
Added dependencies for embedded PostgreSQL and PostgreSQL driver in 'sadu-postgresql' build.gradle.kts for testing purposes. Also, added junit test bundles for standardizing the versions of junit libraries across projects. Included 'mockbukkit' library in 'testlibs' to mock Bukkit classes for unit tests. These additions will allow more comprehensive testing of PostgreSQL related implementations.
Taucher2003
reviewed
Aug 12, 2023
settings.gradle.kts
Outdated
@@ -40,6 +40,14 @@ dependencyResolutionManagement { | |||
plugin("indra-core", "net.kyori.indra").versionRef("indra") | |||
plugin("indra-publishing", "net.kyori.indra.publishing").versionRef("indra") | |||
plugin("indra-sonatype", "net.kyori.indra.publishing.sonatype").versionRef("indra") | |||
|
|||
create("testlibs") { | |||
library("mockbuckit", "com.github.seeseemelk:MockBukkit-v1.19:2.29.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you need MockBukkit here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy Pasta c:
MockBukkit-v1.19:2.29.0 was removed from the 'testlibs' as it was declared unnecessary. JUnit libraries are still present in order to standardise the versions across all projects.
Access modifiers were adjusted in the PostgresqlMapperTest for clarity and encapsulation. Code format in DefaultMapper was modified for readability, including reorganizing imports and adding blank lines for separation. Also removed import statement for Optional as it was not being used. Indentation of mapper methods was reduced for better visibility of method hierarchy.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to #111