[email protected]
Facebook
Twitter
LinkedIn
GitHub
  • Blog
  • GitHub
  • Resume
    • LinkedIn
    • StackOverflow
  • 🙈
    • 🇺🇸 English
    • 🇪🇸 Español
    • 🇫🇷 Français
    • 🇧🇷 Português

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

July 16, 2015LibrariesNo 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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
|---------------------------------------------
| 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/dfahlander/Dexie.js
471 forks.
6,482 stars.
350 open issues.
Recent commits:

  • Releasing v3.1.0-alpha.9, dfahlander
  • Make sure npm version 7 is used, David Fahlander
  • Fixed broken addon deps.Removed dupl dev-deps where possible.Rely on parent dev-deps instead., David Fahlander
  • Don't export namespace Dexie.It's idea was to help typings for those using Dexie as an iife.But 2 problems:1. It prohibits auto-importing Dexie from "dexie".2. It doesn't export Dexie for iife correctly: * Doesn't support new Dexie("dbname") – must be new Dexie.Dexie("dbname").This change may be breaking for those that have relied on it. But they must be very few because we've never documented to create a Dexie instance like that anyway., David Fahlander
  • Upgraded rollup major + plugins, David Fahlander
: Database, HTML5, IndexedDB, JS, Library, Storage, Web Developement
jfadev
https://jordifernandes.com
Programmer and systems analyst since 2006. Graduate in Software Engineering in Marseille +10 years of experience in Web Technologies. Currently VueJS & Symfony.

Related Posts

Material Design Lite (MDL): Google lanza un framework de front-end web para crear sitios con las especificaciones Material Design

July 7, 2015jfadev

Materializecss: another framework for Material Design

July 21, 2015jfadev

Video: Introduction to Apache Cordova in Spanish

August 11, 2015jfadev

Translate


My Tweets

Rencent Posts

  • JFA PWA Toolkit
  • Lista de backlinks para posicionamiento web
  • Lista completa de generadores de backlinks para posicionamiento SEO
  • 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
  • jQuery: Cargar imagenes a medida que se necesitan (lazy load)
  • Materializecss: another framework for Material Design
  • Directory of more of 5.000 APIs

Sponsored Links

Categories

  • APIs (2)
  • Frameworks (8)
  • Libraries (2)
  • News (8)
  • Plugins (2)
  • Projects (1)
  • Sources (1)
  • Tools (4)
  • Tricks (7)

Discover

  • Los Mejores Top 10
  • Slow Fashion Shop

Tags

3D Android API Apple Apps Babylon.js Backlinks Blog Bug Chrome Extension Database E-commerce ES6 Facebook Framework Game Engine Ghost Referrer Google Google Analytics HTML5 IndexedDB Internet of Things iOS jQuery JS Material Design Messenger Native Apps PHP Portfolio Referrer Spam Responsive Secret codes SEO SMS Spam Storage Symfony2 Text editor UI Web Developement WebGL Windows Phone WooCommerce Wordpress
Facebook
Twitter
LinkedIn
GitHub

© 2013-2020 Jordi Fernandes Alves