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

feat(ytdl-mpv)!: split cache main table in main + meta #37

Merged
merged 3 commits into from
Mar 17, 2024

Conversation

andros21
Copy link
Owner

@andros21 andros21 commented Nov 11, 2023

breaking changes

start using the real power of relational database ⚡

related changes:

  • this will allow updating metadata for a given video id
    separately from main table that will contain only the search
    id and the video id (foreign key)

  • the update strategy of meta table is INSERT for new records
    and bulk UPDATE for already present ones, without history

  • DISTINCT SELECT when searching inside playlist is not needed
    any more cause selecting inside meta table that has primary
    key enforcement over video id

  • check db initialization and tables presence at the script
    start and not only when trying to cache an element

Important

Flush cache db or manually remove it please before make install

@andros21 andros21 added bug Something isn't working enhancement New feature or request labels Nov 11, 2023
@andros21 andros21 added this to the v0.7.0 milestone Nov 11, 2023
@andros21 andros21 self-assigned this Nov 11, 2023
@andros21 andros21 force-pushed the sqlite-cache branch 2 times, most recently from 8c2d9a2 to f4fe67d Compare December 30, 2023 09:46
@andros21 andros21 changed the title feat(ytdl-mpv)!: improve cache logic and SQL syntax feat(ytdl-mpv)!: split cache main table in main + meta Dec 30, 2023
**breaking changes**
no more UNIQUE title constrain, only SELECT title for a
given query with DISTINCT

Flush cache db please!
start using the real power of relational database

related changes:

   * this will allow to update metadata for a given video id
   separately from main table that will contain only the search
   id and the video id (foreign key)

   * the update strategy of meta table is INSERT for new records
   and bulk UPDATE for already present ones, without history

   * DISTINCT SELECT when searching inside playlist is not needed
   anymore cause selecting inside meta table that has primary
   key enforcement over video id

   * check db initialization and tables presence at the script
   start and not only when trying to cache an element
@andros21 andros21 merged commit 6b69c8f into master Mar 17, 2024
1 check passed
@andros21 andros21 deleted the sqlite-cache branch March 17, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant