最終更新:2019-06-06 (木) 18:54:54 (1778d)  

Dexie.js
Top / Dexie.js

A Minimalistic Wrapper for IndexedDB

https://dexie.org/

使い方

  • const db = new Dexie('MyDatabase');
    
    // Declare tables, IDs and indexes
    db.version(1).stores({
    	friends: '++id, name, age'
    });

Where

  • db.friends.where('shoeSize')
        .between(37, 40)
        .or('name')
        .anyOf(['Arnold','Ingemar'])
        .and(function(friend) { return friend.isCloseFriend; })
        .limit(10)
        .each(function(friend){
            console.log(JSON.stringify(friend));
        });

定義

  • ++オートインクリメントな主キー
    &ユニークキー
    *複数可(array)
    [A+B]複合index

参考