GRDB-ORM
CoreStore
GRDB-ORM | CoreStore | |
---|---|---|
7 | 11 | |
25 | 3,942 | |
- | - | |
7.4 | 5.3 | |
about 1 month ago | 2 months ago | |
Swift | Swift | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
GRDB-ORM
-
My App 'Beezle Social' Is Live on the App Store. Used: Rust, Swift and AWS
After years of working, I finally completed Beezle Social, discover local events!
Beezle Social is an app that is ready to be downloaded on the App Store and possibly soon on the Play store as well! With Beezle, you can explore events happening nearby. Check out the website at https://beezleapp.com/. The app can be downloaded at: https://apps.apple.com/us/app/beezle-social/id1661982809. I completed this on my own.
Rust is used at the backend. I did choose Rust because of its safety and speed. I took me awhile to get used to the type-system, but after that, I was amazed by the functionality and ecosystem. It is a joy working with macro's, cargo and code quality of other libraries.
Swift is used at the frontend. Obviously I preferred Swift over Obj-c. I used SwiftUI + UIKit to make the UI. The whole chatting part is done with UIKit because SwiftUI does not support advanced text editing options. I used some hacks in the chatting part to make sure SwiftUI doesn't reload everything all the time when a new message comes in.
AWS is used at the deploying side. I used ECS and Docker to deploy the server and a lot of other services for media, CDN and mailing system.
Beezle used libraries I created: https://github.com/Jasperav/Catalytic and https://github.com/Jasperav/GRDB-ORM. Catalytic is an ORM for the scylla-rust-driver and GRDB-ORM an ORM for GRDB.
I am happy to answer any question! Please download the app, leave a review and ping me if you missing features.
- GRDB-ORM, an ORM for GRDB - Swift SQLite
-
How to decide between JSON and CoreData?
I created GRDB-ORM awhile ago: https://github.com/Jasperav/GRDB-ORM. If you wanna use GRDB, make sure to check out the ORM as well. You won't be able to write quicker code yourself :). Note that the setup may take an hour to figure out, but after that you will never ever touch database entities
-
Is there a sqlite connection?
GRDB (and with the orm I made, it should be extremly easy to do anything SQL related: https://github.com/Jasperav/GRDB-ORM)
-
Realm vs CoreData in 2021. Which do you use and why?
GRDB with https://github.com/Jasperav/GRDB-ORM. I wrote the library. I doubt there is any easier way to manage and use a database since this generates the swift structs and ensures compile time checked queries
-
New SQLite ORM library
I also wrote a SQLite orm but it has GRDB as dependency: https://github.com/Jasperav/GRDB-ORM. Here you just write the .sql file and this library will generate the structs for you with a lot of predefined queries: https://github.com/Jasperav/GRDB-ORM/blob/master/GRDBPerformance/GRDBPerformance/Generated/DbUser.swift. Does your library create queries on runtime with the help of metadata? That would be a performance hit
-
Is there any compelling reason to use Core Data over Realm or other options and has SwiftUI changed this?
I use this thin wrapper for GRDB: https://github.com/Jasperav/GRDB-ORM :)
CoreStore
-
Core data example
It’s not from Apple, but there’s a framework called CoreStore which you might find easier to pick up initially.
-
How to manage instances of a class
Core Data (and CoreStore, which is backed by Core Data) is an object persistence system (so objects can survive between application sessions), which lets you work with the objects in a more database-like way. For example, you can ask for all the instances of a Person object which match a predicate like the pets relationship is not nil. You can think of it like a more advanced version of arrays and sets.
-
Details View using CoreData
If you’re just starting out with Core Data, you may want to take a look at CoreStore. It’s an external dependency, but it does feel much more at home in Swift. Less of the constant optional unwrapping, for one.
-
Finally acquainting myself with CoreData after 10 years of mostly avoiding it. Very heavy obj-c baggage. Anyone recommend a wrapper?
CoreStore (though iCloud support is still in the works)
-
Items appended in an array are not remembered after restart.
More complicated than that is Core Data. It’s extremely powerful, but pretty weird to use at first. Doesn’t feel very Swift-y (Check out CoreStore for a more Swift feel). This is great for hundreds or thousands of objects. You can retrieve objects which match a particular search predicate, objects can have relationships to one another (e.g, a manager object can have an employees relationship to multiple employee objects), which you can traverse a lot like normal objects-which-contain-objects. This is massive overkill for storing strings, but great for something like a Twitter or Reddit client.
-
CoreData: the burden of the past
All the issues in the article had been solved by CoreStore since Swift’s inception. Check it out
- Store data and update it
-
Swift Playgrounds iPad - Core Data?
CoreStore works really well for pure Swift models: https://github.com/JohnEstropia/CoreStore/blob/develop/Playground_iOS.playground/Contents.swift
-
Realm vs CoreData in 2021. Which do you use and why?
CoreData through CoreStore. Full disclosure: I’m the author of the lib
-
Do you feel that NSFetchedResultsController doesn't fit well with diffable data source?
Source: I am the author of the CoreStore library. The faulting behavior of NSManagedObjects are what makes them incompatible with redux-type architecture (ex: SwiftUI) which is why CoreStore exposes an ObjectSnapshot as a struct wrapper layer for live objects.
What are some alternatives?
Realm - Realm is a mobile database: a replacement for Core Data & SQLite
encrypted-core-data - v2.0 - iOS Core Data encrypted SQLite store using SQLCipher
GRDB.swift - A toolkit for SQLite databases, with a focus on application development
sqlite_orm - ❤️ SQLite ORM light header only library for modern C++
QueryKit - A simple CoreData query language for Swift and Objective-C.
sqlite-orm-swift - 🧡 Easy to use SQLite ORM library written with love and Swift
MagicalRecord - Super Awesome Easy Fetching for Core Data!
SQLite.swift - A type-safe, Swift-language layer over SQLite3.
AlecrimCoreData
Cadmium - A Swift framework that wraps CoreData, hides context complexity, and helps facilitate best practices.
JSQCoreDataKit - A swifter Core Data stack