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

MetaData first pass #5

Merged
merged 8 commits into from
Jan 10, 2025
Merged

MetaData first pass #5

merged 8 commits into from
Jan 10, 2025

Conversation

chrisjenx
Copy link
Collaborator

@chrisjenx chrisjenx commented Dec 31, 2024

Fix for #4

Key New methods:

  • deleteExpired
  • deleteStale
  • selectResult
  • Added expiresAt/expiresAfter parameters to methods
  • Added metadata() for table level read/write details

This pull request includes various updates and improvements to the library project, including changes to the SQLDelight integration, addition of cache busting features, and updates to dependencies. The most important changes are grouped by their themes below:

SQLDelight Integration and Database Schema Updates:

  • Added verifySqlDelightMigration step to the CI workflow to ensure SQLDelight migrations are verified. (.github/workflows/ci.yml)
  • Updated EntityQueries to include new fields write_at and read_at for better tracking of entity states. (library/src/commonMain/kotlin/com/mercury/sqkon/db/EntityQueries.kt) [1] [2] [3] [4] [5] [6] [7]

Cache Busting and Expiry Features:

  • Introduced cache busting tools in README.MD to handle expiry and stale data. (README.MD)
  • Enhanced KeyValueStorage to support expiry times for entities and added methods to manage expired data. (library/src/commonMain/kotlin/com/mercury/sqkon/db/KeyValueStorage.kt) [1] [2] [3]

Dependency and Version Updates:

  • Updated project version to 1.0.0-alpha02 and upgraded dependencies such as kotlinx-coroutines and agp. (gradle.properties, gradle/libs.versions.toml) [1] [2]
  • Imported app.cash.sqldelight.VERSION in build.gradle.kts and specified the SQLite dialect version. (library/build.gradle.kts) [1] [2]

Code Refactoring and Cleanup:

  • Refactored Sqkon initialization to separate metadataQueries and entityQueries. (library/src/androidMain/kotlin/com/mercury/sqkon/db/Sqkon.android.kt)
  • Removed unused properties and cleaned up gradle.properties. (gradle.properties)

Documentation and Readability Improvements:

  • Minor formatting and readability improvements in README.MD. (README.MD)

These changes collectively enhance the functionality, performance, and maintainability of the project.

@chrisjenx chrisjenx merged commit 880ebe6 into main Jan 10, 2025
2 checks passed
@chrisjenx chrisjenx deleted the cj/meta-data branch January 10, 2025 23:27
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.

2 participants