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

Cache files via SQLite #4

Open
logue opened this issue Sep 30, 2022 · 1 comment
Open

Cache files via SQLite #4

logue opened this issue Sep 30, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@logue
Copy link
Owner

logue commented Sep 30, 2022

Evolve the file list output function and save it with SQLite. Main use is cache.

  • The PSO2 part and the NGS part are managed separately as before.
  • Prepare a table that contains the file name, the last modification date and time of the file, and the md5 hash in the parent table, and a child table that stores the contents of the file, and save them in a 1:Many relationship.
  • Due to the SQLite specifications, there is not much merit in managing IDs with numbers, so UUIDs are used for primary keys. Currently, it is treated as Homebrew, so sharing sqlite files with others is not considered.
erDiagram

files {
  string id
  string name 
  integer format
  string hash
  datetime updated_at
}

contents {
  string id
  string file_id
  string name
}

files ||--|{ contents: ""
Loading
@logue logue added the enhancement New feature or request label Sep 30, 2022
@logue logue added this to the 2.0 milestone Sep 30, 2022
@logue
Copy link
Owner Author

logue commented Feb 8, 2023

The file name should be the path from the data directory.

For example, the data on the pso2 side will have a name like win32\0000ad8daf393f31da0fd7e26829c819, and the data on the PSO2NGS side will have a name like win32reboot\00\00ad8daf393f31da0fd7e26829c819.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant