amaris / core-data-candy Goto Github PK
View Code? Open in Web Editor NEWExtensions and mapping on CoreData entities to provide easy to use data models and fetching functions.
License: MIT License
Extensions and mapping on CoreData entities to provide easy to use data models and fetching functions.
License: MIT License
UIColor
with CodableConvertible
CodableConvertible
with NSObject
Currently the initialisation with a Data
or RawRepresentable
fields exits with a preconditionFailure
. It should be possible to specify a fallback value to prevent this error. This fallback value should be added on mappings that also offers a defaultValue to ignore nil
attributes.
For now, if we declare a Field
that is mapped to a RawRepresentable
, optional values are supported for reading (eg. initial value can be nil
) but it isn't supported for writing.
This has to be handled in FieldInterfaceProtocol.swift#74
It should be possible to access a model current parent.
func parent<P: ParentInterfaceProtocol>(_ keyPath: KeyPath<Self, P>) -> P.ParentModel?
Currently, the fetch request predicate specification only allows flat compound predicates:
Player.request()
.all()
.where(\.name == "Toto")
.and(\.age, .isIn(20, 30, 40))
.or(\.score > 400)
Doing so, the predicate is name == "Toto && age IN {20,30,40} OR score > 400
.
There is no way to specify this predicate: name == "Toto && (age IN {20,30,40} OR score > 400)
.
The goal is to add nested compound predicates, either by adding the possibility for an and
predicate function to have another compound operator, or with another way.
Currently, the compound predicates are specified as NSPredicate
with a raw format. Change those specifications by using NSCompoundPredicate
Currently, it's possible to specify a sort on the received values for an entity relationship:
player.publisher(for: \.games, sortedBy: .ascending(\.name))
Additional sorts should be allowed, sorting the data if the previous one returns an equalComparison
.
It is possible currently to fetch on an attribute with is destined to be converted an an enum value:
Animal.request().all().where(\.type == AnimalType.duck.rawValue)
It would be nice to be able to remove the boilerplate.
Animal.request().all().where(\.type == .duck)
To do so, maybe the Predicate
struct should hold another generic DatabaseModel
type since the mapping from a raw value to a enum is known in the model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.