June 2017
Intermediate to advanced
873 pages
18h 9m
English
Web SQL was introduced by Apple and is based on a free database SQLite. It will be discontinued very soon, and I intend to add it here only to show you how it could be used and how we can migrate to other advanced techniques without glitches. In the following code, we created a new shopping_cart_web_sql project as a copy of the project from the Web Storage section and added WebSQLStorageManager into the StorageManager class:
abstract class StorageManager { factory StorageManager() { if (WebSQLStorageManager.supported) { return new WebSQLStorageManager(); } else if (WebStorageManager.supported) { return new WebStorageManager(); } else { return new CookieStorageManager(); } } Future<String> getItem(key); Future setItem(key, value); Future ...Read now
Unlock full access