Giter VIP home page Giter VIP logo

mobstr's People

Contributors

dependabot[bot] avatar ducharmemp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mobstr's Issues

Refactor meta attributes to be part of the store

Due to insights while creating the createIndex function, all of our meta attributes on our classes could be refactored into the store itself. This would allow a leaner class implementation and cause the user classes to go untouched.

Multi-column Indexes and Primary Keys

Due to the merge of #3, we now have a story in place for indexed values that are complex in shape. Utilizing this same strategy, we can hash lists of index properties and multi-column primary keys without losing out on too much performance.

Plain object storage and shape description

Currently, only class-based model storage is possible. It would be nice to provide a wrapper function or helper to seamlessly insert and query plain javascript objects.

This would require figuring out a story for storing the "name" attribute of objects, and figuring out how to apply constraints and indexes to the object shapes themselves. I'd rather not go with something like prop-types for this if possible.

Composite index structures

Currently primaryKeys can only be of type string | symbol | number, due to usage in the native Map structure. It would be nice to specify (somehow) composite/complex primary key attributes.

Index-only lookup methods

Fast index scans would be a nice-to-have feature to ensure that the user can look up by index value quickly.

Questions to answer:

  • Should indexing be allowed on foreign keys? It doesn't make sense for the current representation of the __meta__ attributes so we might have to refactor
  • How should we store the index values? In a Map? Does a Splay Tree or Red-Black tree make more sense here? Need to do research

Ability to disable constraint checks in production

Constraint checks are widely used for debugging purposes, although not always. There should be an option for the user to specify that they want all constraint checks to be skipped.

This could be a foot-gun. I'm not sure that it's worth the configuration.

Helper methods for development checking

During development, mobstr should perform invariant checks to ensure certain properties are consistent. For example, primary keys should be present on all models.

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.