Avatar
みなさんありがとうございました! もやもや悩んでいたのが納得する形で解消できました ✨
SwiftDataを使うとき、 ①ドメインと兼用してViewから直接参照して使うか(公式のサンプルではそんな感じ)、 ②SwiftDataのモデルとViewの間に、ドメインとして構造体かませるのがいいか、
について、②の方針でやってみることにします。
型分けすぎで失敗するのはそこまで突き進んでやっとわかってくる感覚だからどんどんやってみるのがいい
かなり心強いです。どんどんやってみます💪
👍 1
10:22 AM
生SQLiteというと、pointfreeからsqlite-dataのライブラリが出ていて、テスタブルなのが魅力でこれも気になっていました。 https://github.com/pointfreeco/sqlite-data https://www.pointfree.co/collections/sqlite
A fast, lightweight replacement for SwiftData, powered by SQL and supporting CloudKit synchronization. - pointfreeco/sqlite-data
SQLite is one of the most well-crafted, battle-tested, widely-deployed pieces of software in history, and it's a great fit for apps with more complex persistence needs than user defaults or a JSON file. This collection serves as an introduction to the basics of SQLite, as well as an exploration into more advanced topics and techniques for integr...