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

Rewrite database to ORMLite JDBC #78

Closed
Jakubk15 opened this issue Sep 2, 2023 · 0 comments · Fixed by #116
Closed

Rewrite database to ORMLite JDBC #78

Jakubk15 opened this issue Sep 2, 2023 · 0 comments · Fixed by #116
Labels
⚙️ architecture Applies to architecture 🔄 recode This function needs to be recoded.

Comments

@Jakubk15
Copy link
Member

Jakubk15 commented Sep 2, 2023

Rewrite the database system to a more robust system like ORMLite. It is easier, the code will be cleaner, and we can support more databases at the same time without much boilerplate code.

@Jakubk15 Jakubk15 moved this to 📋 Backlog in ParcelLockers Sep 2, 2023
@Jakubk15 Jakubk15 added 🔄 recode This function needs to be recoded. ⚙️ architecture Applies to architecture labels Sep 2, 2023
@Jakubk15 Jakubk15 changed the title Rewrite database to ORMLite JDBC (far in the future) Rewrite database to ORMLite JDBC Sep 21, 2024
@Jakubk15 Jakubk15 moved this from 🗒️ TODO to 🏗 In progress in ParcelLockers Dec 31, 2024
Jakubk15 added a commit that referenced this issue Jan 15, 2025
* Start working on new database system

* Add ParcelWrapper class, add ORMLite repository implementation

* Fix immutable list modification, apply codestyle changes

* Implement Locker ORMLite repository

* Add ItemStorage ORMLite repository implementation

* Add User ORMLite implementation

* Add ParcelContent ORMLite implementation

* Use CompletableFuture#runAsync instead of scheduler one. Delete legacy database classes

* Set more DatabaseManager properties

* Fix integration tests

* Update TODO

* Update version in Gradle

* Fix cache and rename getInstance to getSingleton in persister classes

* Bump spigot-api to 1.21.4

* Disable ORMLite logs

* Tick TODO

* Apply suggestion

* Apply CodeRabbit suggestion regarding remove() method in ParcelRepositoryOrmLite

* Add TestScheduler

* Revert "Use CompletableFuture#runAsync instead of scheduler one.

This *partially* reverts commit 953942a

* Use ConcurrentHashMaps in caches

* Fix unit tests build

* Update src/main/java/com/eternalcode/parcellockers/database/DatabaseManager.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Revert version check

* Update src/main/java/com/eternalcode/parcellockers/locker/repository/LockerRepositoryOrmLite.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Correct order of CRUD operations

* Correct isAsync method

* Make locker positions unique

* Rename warp to entity

* Update MC version in artifact name

* Apply Rollczi's suggestions

* Update src/test/java/com/eternalcode/parcellockers/TestScheduler.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Refactor caching system

* Update src/main/java/com/eternalcode/parcellockers/parcel/repository/ParcelWrapper.java

Co-authored-by: DMK <[email protected]>

* Update src/main/java/com/eternalcode/parcellockers/parcel/repository/ParcelWrapper.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/main/java/com/eternalcode/parcellockers/ParcelLockers.java

Co-authored-by: DMK <[email protected]>

* Update src/main/java/com/eternalcode/parcellockers/database/persister/PositionPersister.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/main/java/com/eternalcode/parcellockers/database/persister/PositionPersister.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/main/java/com/eternalcode/parcellockers/content/repository/ParcelContentRepositoryOrmLite.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Apply CodeRabbit suggestions

* Fix build

* Fail-fast if table creation does not succeed

* [ci skip] Assign databaseManager field

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: DMK <[email protected]>
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in ParcelLockers Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ architecture Applies to architecture 🔄 recode This function needs to be recoded.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant