[email protected]
Twitter
LinkedIn
GitHub
  • Blog
  • GitHub
  • Resume

Dexie.js: A simple and robust library for indexedDB (HTML5 Storage)

July 16, 2015Front-EndNo Commentsjfadev

Dexie.js is a simple and concise library to work with the “Indexed Database API” or IndexedDB.

IndexedDB it is a way of storing data persistently in the browser. Given that allows the creation of web applications with enhanced query capabilities, These can be run both online and offline. IndexedDB is useful for applications that store a lot of data and applications that do not need a permanent connection to the Internet to work.

It can also be very useful to save data to local in a hybrid app for example.

Example of use:

/*
|---------------------------------------------
| Make a database connection
|---------------------------------------------
*/

var db = new Dexie('MyDatabase');

// Define a schema
db.version(1)
    .stores({
        friends: 'name, age'
    });

// Open the database
db.open()
    .catch(function(error){
        alert('Uh oh : ' + error);
    });


/*
|---------------------------------------------
| Then run some queries
|---------------------------------------------
*/

// Find some old friends
db.friends
    .where('age')
    .above(75)
    .each(function(friend){
        console.log(friend.name);
    });

// or make a new one
db.friends
    .add({
        name: 'Camilla',
        age: 25
    });

Web: dexie.org

Documentation: GitHub

Repository

A Minimalistic Wrapper for IndexedDB
https://github.com/dexie/Dexie.js
556 forks.
8,111 stars.
415 open issues.

Recent commits:
  • Removing the "engines" field.Resolves #1583., dfahlander
  • Update README.md, GitHub
  • Update README.md, GitHub
  • Update README.md, GitHub
  • Update README.md, GitHub

: Database, HTML5, IndexedDB, JS, Library, Storage, Web Developement
jfadev
https://jordifernandes.com
Programmer and Web Developer since 2006. Graduate in Software Engineering in Marseille 15+ years of experience in Web Technologies.

Twitter

My Tweets

Rencent Posts

  • Display a specific Instagram post in WordPress with Jfa Social Media Post
  • Build a custom image and distribute them to Azure VMSS using GitHub Actions
  • PHP-FPM Process Calculator
  • Jfa PWA Toolkit
  • List of backlinks for SEO
  • Full list backlinks generators for SEO positioning
  • Modal Dialog for Material Design Lite
  • Run Symfony2 command from cronjobs in CPanel on a shared host
  • Detecting AdBlock with jQuery or JavaScript
  • Video: Introduction to Apache Cordova in Spanish

Categories

  • Back-End (5)
  • DevOps (1)
  • Front-End (12)
  • News (8)
  • SEO (2)
  • Tools (6)
  • Tricks (10)
  • Uncategorized (3)

Discover

  • Los Mejores Top 10
  • Slow Fashion Shop
Twitter
LinkedIn
GitHub

© 2013-2022 Jordi Fernandes Alves (@jfadev)