GithubHelp home page GithubHelp logo

Support id as string about kakapo HOT 5 CLOSED

devlucky avatar devlucky commented on May 22, 2024
Support id as string

from kakapo.

Comments (5)

MP0w avatar MP0w commented on May 22, 2024

@devlucky/kakapo-core

from kakapo.

zzarcon avatar zzarcon commented on May 22, 2024

Yes, that's why I suggested devlucky/Kakapo.js#24.

And basically allow the user to specify the type of id (we can go with autoincrement as default behaviour)

from kakapo.

MP0w avatar MP0w commented on May 22, 2024

I would say that Int will be the default and Storable will use the current implementation (Int). Then We can create a simple protocol CustomStorable or StringStorable or whatever
that has a default implementation that convert the Int to String and add a computed property:

var id: String {
    get {
       return String(id) // the Int id
    }
}

from kakapo.

MP0w avatar MP0w commented on May 22, 2024

Unfortunately we might need special handling in the Serializer to avoid using the Int in the JSON so maybe it should be the other way around

from kakapo.

MP0w avatar MP0w commented on May 22, 2024

@devlucky/swift-core let's discuss before deciding if it should be in the Milestone... looks like we are not sure if we want this (cc/ @zzarcon )

from kakapo.

Related Issues (20)

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.