Comments (3)
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.
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.
"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)
- Plain object storage and shape description HOT 1
- Ability to disable constraint checks in production HOT 1
- Truncate doesn't actually truncate indicies, doesn't properly drop collection values
- Multi-column Indexes and Primary Keys
- Helper methods for development checking
- Index-only lookup methods HOT 1
- Fix types for decorators and utility functions
- Refactor meta attributes to be part of the store
- Foreign Key Description
- Deferred relationship updates, so as not to trigger a re-render of reactive components on a relationship update HOT 1
- Cascade options for deleting from relationships
- Create Trigger Semantics
- Decorator for adding Store Constraints to Fields
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobstr.