microsoft / cordova-plugin-websql

Cordova WebSQL Plugin
Other
61 stars 40 forks source link

Plugin should be asynchronous #16

Open DibranMulder opened 9 years ago

DibranMulder commented 9 years ago

The WebSQL interface described as in the W3 specification (http://www.w3.org/TR/webdatabase/#asynchronous-database-api) is asynchronous. This plugin however is synchronous. This is unfortunately a major issue for the user experience.

I know its possible because Cordova offers a async API for native calls. The methods should return an IAsyncOperation which can be retrieved from a System.Thread.Task. The JavaScript will then return a promise instead of an instance of T.

joeljeske commented 9 years ago

+1 This is critical as applications expect the queries to be async and when that is changed, things break. In addition, it leads to a very poor user experience when dealing with any non-trivial datasets, especially on mobile devices.

Please fix.