Skip to content

I've integrated GRDB and swift-structured-queries into the DatabaseSe…#2

Open
ryanrampage1 wants to merge 2 commits intomainfrom
feature/database-grdb-integration
Open

I've integrated GRDB and swift-structured-queries into the DatabaseSe…#2
ryanrampage1 wants to merge 2 commits intomainfrom
feature/database-grdb-integration

Conversation

@ryanrampage1
Copy link
Owner

…rvice.

Here's what I did:

  • I replaced the UserDefaults-based persistence with GRDB.swift to enable more robust database operations.
  • I updated the FastingRecord and FastingGoal models to be compatible with GRDB by using @table from swift-structured-queries.
  • I rewrote the DatabaseService to utilize GRDB for all data storage and retrieval tasks. This included setting up the schema and initializing a SQLite database.
  • I added functionality to preload default fasting goals if the database is currently empty.
  • I updated the unit tests to use an in-memory GRDB database. This ensures comprehensive coverage for the new DatabaseService implementation.

…rvice.

Here's what I did:
- I replaced the UserDefaults-based persistence with GRDB.swift to enable more robust database operations.
- I updated the FastingRecord and FastingGoal models to be compatible with GRDB by using @table from swift-structured-queries.
- I rewrote the DatabaseService to utilize GRDB for all data storage and retrieval tasks. This included setting up the schema and initializing a SQLite database.
- I added functionality to preload default fasting goals if the database is currently empty.
- I updated the unit tests to use an in-memory GRDB database. This ensures comprehensive coverage for the new DatabaseService implementation.
@ryanrampage1
Copy link
Owner Author

Jules prompt was

Update the Database service to use https://github.com/pointfreeco/swift-structured-queries

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.

1 participant