Code Monkey home page Code Monkey logo

crumbsdb's People

Contributors

michaelgira23 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

crumbsdb's Issues

Decide what to do if version mismatch or table column mismatch

Currently, the plan is to have the user initialize all of the tables they want to use (including table name and column names and types). If the table matches an existing table stored in the cookie, it will simply use the data from the existing table. If it does not match any existing table, it will create a new one.

The problem is what happens if a table has the same name as an existing table, but different column names or types. Here are a few options:

1. Try to handle existing table as best as possible: any existing columns will be translated over to the new table, and existing columns not in the new configuration will be dropped. Any new columns will use default values. If no default values provided, entire row will be dropped completely.

2. Delete existing table as if nothing ever happened

Most likely go with option 1.

This same issue is present for the crumbsDB version number inserted at the beginning of the cookie (Ex. [crumbsDB 1.0.0]).

1. Try to handle as gracefully as possible: Try to make most sense out of the data if possible. Similar to option 1 above. If can't parse database, just drop it.

2. Delete old table

Most likely, we will go with option 2 if the major version is different (Ex. 2.0.0 vs 1.0.0) following the semver convention.

We must also decide whether to keep old crumbsDB data. Should we store the cookie as {TABLE_NAME}-{CRUMBSDB_VERSION} in case crumbsDB is reverted back?

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.