Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //provide database name and version number
- var request = indexedDB.open("checkin");
- var db = null;
- request.onupgradeneeded = function(){
- db = request.result;
- //create object store and define key property of the objects on that store i.e., primary index. Here "ID" is the key
- var store = db.createObjectStore("tbPos", {keyPath: "ID", autoIncrement: true});
- //define other properties of the objects of that store i.e., define other columns.
- store.createIndex("lat", "lat", {unique: false});
- store.createIndex("lng", "lng", {unique: false});
- store.createIndex("usuario", "usuario", {unique: false});
- store.createIndex("rota", "rota", {unique: false});
- store.createIndex("cliente", "cliente", {unique: false});
- store.createIndex("hora", "hora", {unique: false});
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement