Git Product home page Git Product logo

db64's People

Contributors

julienetie avatar lin-credible avatar mth-bou avatar unsleeping avatar vladnomad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

db64's Issues

Add create new store capability

Due to the way versioning works it is not possible to modify the schema of a database without creating a new version.

But this can be worked around by:

  • Copying existing stores from the DB to be modified
  • Deleting the database
  • Creating a new DB with new and existing store names
  • Populating the existing data back to the stores they came from

This API will be in the form of:

  • db.addStore()
  • db.deleteStore()

Taking one or many store names. And will do nothing if the store exists or does not exist respectively.

This feature will simplify the lifecycle management of Indexeddb.

Fix terser sourcemaps

Sourcemaps are currently commented out in create-distribution.js because they're not yet referenced in the minified files. This needs fixing.

Delete is required for changes in databases to be updated on a client

Delete is necessary for when existing databases in a user's browser needs to be destroyed and recreated.

The only way to add a new database is to increase the version or delete and re-create all the effected databases.

The current workaround to this is:

const req = indexedDB.deleteDatabase('databaseName')
req.onsuccess = () => {
    console.log("Deleted database successfully")
}
req.onerror =  () => {
    console.log("Couldn't delete database")
}
req.onblocked = () => {
    console.log("Couldn't delete database due to the operation being blocked")
}

Proposed solutions:

db64.delete('databaseName')

Refactor and comment

There are several opportunities to improve refactoring.
Comments can help to encourage users and contributors to understand how it works since it's a fairly simple codebase.

[BUG] Readme Example

First example, should be?

await db64.create('Games', ['Super Nintendo', 'Gameboy'])

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.