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

Postgres mapper test and bugfixes #111

Merged
merged 8 commits into from
Sep 28, 2023
Merged

Conversation

rainbowdashlabs
Copy link
Owner

@rainbowdashlabs rainbowdashlabs commented Aug 12, 2023

Relates to #111

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.
@rainbowdashlabs rainbowdashlabs changed the base branch from main to dev August 12, 2023 10:56
@@ -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")
Copy link
Contributor

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?

Copy link
Owner Author

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.
@rainbowdashlabs rainbowdashlabs temporarily deployed to build August 12, 2023 13:31 — with GitHub Actions Inactive
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.
@rainbowdashlabs rainbowdashlabs temporarily deployed to build August 12, 2023 13:35 — with GitHub Actions Inactive
@rainbowdashlabs rainbowdashlabs marked this pull request as ready for review August 12, 2023 13:52
@rainbowdashlabs rainbowdashlabs changed the title Feature/postgres mapper test Postgres mapper test and bugfixes Aug 12, 2023
@rainbowdashlabs rainbowdashlabs enabled auto-merge (squash) September 28, 2023 22:33
@rainbowdashlabs rainbowdashlabs merged commit 484a07c into dev Sep 28, 2023
2 checks passed
@rainbowdashlabs rainbowdashlabs deleted the feature/postgres-mapper-test branch November 23, 2023 16:26
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.

None yet

2 participants