[TIMOB-27111] Android: Implement async Ti.Database.DB methods
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-06-28T21:09:56.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.1.0 |
Components | Android |
Labels | n/a |
Reporter | Gary Mathews |
Assignee | Gary Mathews |
Created | 2019-05-29T20:40:15.000+0000 |
Updated | 2019-06-28T21:09:56.000+0000 |
Description
- Implement asynchronous
Ti.Database.DB
methods for executing SQL queries.
- Implement method for executing multiple queries in one shot. (Useful for transactions)
Ti.Database.DB.executeAsync(callback, query, parameters...);
Ti.Database.DB.executeAll(queries);
Ti.Database.DB.executeAllAsync(callback, queries);
Is this planned for iOS as well? Also, the callback should be the 2nd parameter to match common JavaScript API designs.
We're still designing the final API for this. It's not set in stone yet and will likely change. Once settled, we'll implement it on iOS. We'll likely need to create new async Alloy collection APIs too.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10920 PR (8.1.x): https://github.com/appcelerator/titanium_mobile/pull/10999
Verified the fix in SDK 8.1.0.v20190628095604 & 8.2.0.v20190628101943. Closing. Studio Ver: 5.1.3.201906102126 OS Ver: 10.14.5 Xcode Ver: Xcode 10.2.1 Appc NPM: 4.2.13 Appc CLI: 7.0.12 Daemon Ver: 1.1.3 Ti CLI Ver: 5.1.1 Alloy Ver: 1.13.10 Node Ver: 8.15.1 NPM Ver: 6.4.1 Java Ver: 10.0.2 Devices: ⇨ google Pixel (Android 9)