Sunday, January 27, 2019

Re: elemental2 indexeddb example?

Thanks, I did make some progress.   I dug around a little in the javadoc and found the IndexedDbGlobal, which I was able to use to create a new database.

elemental2.indexeddb.IDBFactory indexedDB = elemental2.indexeddb.IndexedDbGlobal.indexedDB;

elemental2.indexeddb.IDBOpenDBRequest openDBRequest ="mydbtest", 1.0);

So far so good.

With a open database call, I get a returned object of elemental2.indexeddb.IDBOpenDBRequest (

In the google documentation that I have found that describes the indexedDB open operation,

They provide the following code:

  var dbPromise ='test-db2', 1, function(upgradeDb) {
.log('making a new object store');
if (!upgradeDb.objectStoreNames.contains('firstOS')) {

I want to register a function to execute when the database is upgraded.  I see there is a openDBRequest.onupgradeneeded(), but I just can't the syntax right.

elemental2.indexeddb.IDBFactory indexedDB = elemental2.indexeddb.IndexedDbGlobal.indexedDB;

elemental2.indexeddb.IDBOpenDBRequest openDBRequest ="mydbtest", 1.0);

//how to i call a function for upgrade?  I want to create some object stores.

openDBRequest. onupgradeneeded = doUpgrade();

Thanks for your help.

On Sunday, January 27, 2019 at 5:48:37 AM UTC-5, Thomas Broyer wrote:
Elemental2 API map directly to the native browser APIs, so you'll start with IndexedDBGlobal.indexedDB and walk your way almost exactly like you'd do in JS.
Javadoc can be found here fwiw:

On Sunday, January 27, 2019 at 5:57:44 AM UTC+1, rhodebump wrote:

I am interested in using indexeddb from within GWT.  I found the following library that indicates that it provides indexeddb support

Does anyone have an example of opening a database? 



You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment