Git Product home page Git Product logo

core-data-candy's People

Contributors

abridoux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

abridoux

core-data-candy's Issues

Prepare for release 0.2.0

  • Change the example with UIColor with CodableConvertible
  • CodableConvertible with NSObject
  • Change the architecture diagram
  • Add a MIT license
  • Change the file header

Allow optional RawRepresentable Field

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

Offer a way to get a model parent

It should be possible to access a model current parent.

func parent<P: ParentInterfaceProtocol>(_ keyPath: KeyPath<Self, P>) -> P.ParentModel?

Add a nested compound predicate feature when fetching

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.

Offer multiple sorts on a relationship publisher

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.

Fetch an enum stored by its raw value by specifying the case

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.