Bodega icon indicating copy to clipboard operation
Bodega copied to clipboard

Remove dependency on SQLite.swift

Open mergesort opened this issue 2 years ago • 2 comments

SQLiteSwift is doing rather minimal work in the SQLiteStorageEngine, and was added because I was building a prototype to see the performance of an SQLite-backed StorageEngine. Now that the concept has been proven out quite successfully I'd like to remove the dependency, though I don't have the time to do so at the moment so Bodega can be a free-standing solution without depending on any other libraries.

I'd be very happy to accept help if someone has the expertise to convert the handful of queries that make up the read/write/delete operations in SQLiteStorageEngine, and willing to offer help if you run into any issues. 🙇🏻‍♂️

mergesort avatar Jan 03 '23 03:01 mergesort

Hi, I was about to open an issue on Boutique to ask it, but I think it's more relevant here:

I have some viewModels using @Stored(in:) to access the database data.

The problem I'm hitting is that unit tests tend to fail easily when the whole suite is running (as the persistence of mocks happen during integration tests): is there an option to enable Sqlite in-memory database, or could be added after this work? Or alternatively, do you recommend any strategy to test components with @Stored properties?

mcomisso avatar May 08 '23 15:05 mcomisso

It looks like there is a PR in progress for this already which is great 🙌 I just wanted to add a note though in case anybody runs into the same issue that I faced:

When trying to use Bodega/Boutique in a Swift Playgrounds project, you’ll run into an issue because 0.13.x of SQLite.swift has a non-swift package target. The solution would be to update the dependency to 0.14.x, or better yet, remove the dependency entirely (this ticket)

liamnichols avatar May 29 '23 22:05 liamnichols