Questions tagged [db.js]

An IndexedDB convenience library which prefers Promises over events.

An IndexedDB convenience library which prefers Promises over events.

6 questions
3
votes
1 answer

How long can the server connection be persisted in db.js?

I'm looking at using the db.js wrapper for IndexedDB: https://github.com/aaronpowell/db.js In the docs is says: A connection is intended to be persisted and you can perform multiple operations while it's kept open. Check out the…
gusgorman
  • 170
  • 1
  • 11
2
votes
1 answer

db.js - Trouble adding a record to IndexedDB

I'm not sure what I've done wrong here. This is almost identical to the db.js example. I see the indexeddb in my developer tools, but I can't figure out why adding a record is throwing this error: Uncaught DataError: Failed to execute 'add' on…
2
votes
2 answers

IndexedDB callback not updating UI in angularjs

I am using the following library to access IndexedDB in Angularjs on a new Chrome App: https://github.com/aaronpowell/db.js When I try to update the UI on App startup by using this : db.orders.query().all().execute().done(function(results) { …
Vikas Singhal
  • 811
  • 1
  • 9
  • 17
1
vote
2 answers

Building Node.js API (Unexpected Token error mongodb connection using standard MongoDB URI)

1) config/db.js : module.exports = { url: mongodb://username:password@ds159400.sample.com:89400/databasename }; 2) Error log: url: mongodb://username:password@ds159400.sample.com:89400/databasename ^ …
1
vote
3 answers

How can I get the key as well as the value when using db.js to query IndexedDB?

I have an IndexedDB of changes. I add an item like this, and then log the result to check the key has been created successfully: _this._idb.add('steps', step).done(function (items) { var item = items[0]; _logger.log("ADDED STEP", {…
Jude Fisher
  • 11,138
  • 7
  • 48
  • 91
0
votes
1 answer

Can't save big arrays into IndexedDB using db.js

I tried to save a big array into a IndexedDB database using db.js. The Array contains, varying from the user, 100-1000 elements because I'm working at a Windows 8 Store-App in JS and the array contains objects for all photos found in the users…
Martin
  • 381
  • 4
  • 17