Move store storage behind an interface with a SQLite backend

Đang mở
#52 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, sqlite
Lĩnh vực
backend, database

Hướng nghiên cứu

Start by locating Warehouse and the core module to understand how stores are currently loaded and saved; then inspect the existing test setup and SQLite JDBC dependency. The issue calls for a repository interface, SQLite and in-memory implementations, schema versioning, and a transaction log, but does not name specific files or tests. Done means the plugin uses SQLite for persistence, survives an unclean server shutdown, and tests use the in-memory implementation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Problem

Stores are saved to a single HOCON file by Warehouse. The whole file is rewritten on save, data can be lost if the server doesn't shut down cleanly, and there's nowhere to keep a transaction history.

Goal

Move storage behind an interface, with SQLite as the default backend for 1.0.

Scope

  • A repository interface (for example StoreRepository) in core, with one implementation per backend.
  • A SQLite implementation. Spigot and Paper already bundle the SQLite JDBC driver.
  • Keep store details (name, owner, location, flags) in memory, because the entrance check runs on every player move. Write item and balance changes as they happen, or shortly after in the background. Data must not depend on a clean shutdown.
  • A schema_version table from the start, so later schema changes can be applied automatically.
  • A transaction log table.
  • An in-memory implementation for tests. Making it selectable in the config is a stretch goal.

Out of scope

  • Importing existing 0.x data (separate issue).
  • MySQL or other remote databases.

Done when

  • The plugin runs entirely on SQLite, and stores survive a server crash (kill -9).
  • Tests use the in-memory implementation.
Ngôn ngữ chính
Java
Star
1
Fork
0
Merge trung bình
2 giờ 35 phút
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của BrendonButler/Shops

Tất cả issue của BrendonButler/Shops

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.