var db = new Dexie(app.settings.unpublishedBooksDb);
db.version(1).stores({
friends: "++id,name,shoeSize"
});
db.open();
db.close();
上記のコードを使用して事前に作成された indexedDB データベースがあり、アプリケーションの別のビューで、テーブルに行を追加する必要があります。
var db = new Dexie('myDb');
db.open().then(function() {
console.log ('opened'); //this works
db.friends.add({name:"Fredrik"}); //this doesnt do anything and adding a catch doesn't throw an error either
}).finally(function () {
db.close();
});
使ってみ.transaction
ましたが同じです。Chrome のコンソールを使用しようとすると、次のエラーが表示されます:未定義のプロパティの追加を読み取ることができません