Giter VIP home page Giter VIP logo

Comments (3)

ducharmemp avatar ducharmemp commented on August 13, 2024

After further thought on this, I'm not sure that it's worth the effort to do this. The main issue is that there's no (good) way to maintain a Set as a key for a record. This could, however, utilize something like a red-black tree or a splay tree with a custom comparator, but then the comparator has to be kicked up to the user to be defined which is a bit awkward.

Thinking about this from a front-end store implementation, would this even be useful? I can see the constraint checks being useful during creation of objects from a form. However, most objects will come from an external API which should already have a primary key representation.

from mobstr.

ducharmemp avatar ducharmemp commented on August 13, 2024

I'm changing the description of this to scope it to complex index structures. If I can solve index values with a complex shape then I can possibly leverage that solution for primary keys as well since they live in the same space.

from mobstr.

ducharmemp avatar ducharmemp commented on August 13, 2024

"Inspiration" struck. We can use the popular object-hash to conditionally hash non-primitive values. This is fairly slow, so indexes on lists or objects are not trivial

from mobstr.

Related Issues (14)

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.