AngularJS IndexedDB Cheatset by soiqualang :v


My git repo


This is my note to work with indexedDB

I used lib from here:

AngularJS IndexedDB Cheatset

Declare App

Create Database

db.createObjectStore(storeName, options);

Declare a database

store.createIndex(indexName, keyPath, options);

Declare index for search able fields


Insert single record

Insert an array

Select all records

Get all key


Delete all

Delete a record

Count records

Search – Find

Search item where id=9

Build a query

  • $lt(value) – less than
  • $gt(value) – greater than
  • $lte(value) – less than or equal
  • $gte(value) – greater than or equal
  • $eq(value) – equal
  • $between(lower, upper, doNotIncludeLowerBound? true/false, doNotIncludeUpperBound true/false) – between two bounds
  • $desc(unique) – descending order
  • $asc(unique) – ascending order
  • $index(value) – name of index

Find all records with country = “Norway”

That’s all, hope it useful for you^^

(But I’m still finding a way to help search text like .. like "%blabla%" @@)