web-sql

HTML5 WebSQL: how to know when a db transaction finishes?

ε祈祈猫儿з 提交于 2019-11-30 05:22:19
I've the following code that gets a json recordset and insert some data in three different tables on the client Web Sql storage. How can I intercept the end of databaseSync() function? What I want to do is display an alert or better an ajax spinner gif in order to inform the user when the sync is complete. Many thanks for your help, ciao! function databaseSync() { // table one $.getJSON("http://192.168.1.40:8888/iOS/mobilesrv/index.php?ACT=one", function(json) { $.each(json.results, function(i, res) { db.transaction(function(tx) { tx.executeSql("INSERT INTO table1 (A, B, C, D) VALUES (?,?,?,?)

phonegap - sqlite or Indexed DB?

孤街浪徒 提交于 2019-11-30 03:45:59
I am web developer starting with phonegap. I need to create one app for iPhone, android and Windows Phone 8. I need to store some data (too big for localStorage) locally. I don't know witch solution is the best: Phonegap provides Storage (based on WebSQL - which is deprecated), but it is not supported by windows phone. Is there any plugin to fill this gap? I read about Indexed DB, but I haven't used it before and it is not very intuitive for me. I am not sure if it is fully supported in all platforms? I based on ( http://blog.nparashuram.com/2012/10/indexeddb-example-on-cordova-phonegap_12

How to delete a database in WebSQL programmatically?

强颜欢笑 提交于 2019-11-30 01:12:32
I am new to Web SQL database and I use it to save data in a local database in a web page.  I can create a database by var db = openDatabase('database', '1.0', 'my database', 2 * 1024 * 1024);  and I can create a table by doing this db.transaction(function (tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS mytable (blah,blah)'); });  I can delete the table by db.transaction(function (tx) { tx.executeSql('DROP TABLE mytable'); });  but is there a way to delete the database programmatically? Spec says: 4.1 Databases Each origin has an associated set of databases. Each database has a name and a

Phonegap. What happens to web SQL database on app update?

孤街醉人 提交于 2019-11-29 15:29:29
Please excuse the very novice question but I am about to embark on my first mobile app project using Phonegap. My project will rely heavily on a web SQL database. When I make updates to the app in the future, I need the database the user has built up to remain intact. I would assume the database is contained within the app package, When they update, what happens to the database? is it completely reset with the new app? (I've spent quite sometime googling this but have not found an answer to my query) It will remain as it is (except the iOS 5.1 bug which is already resolved - https://issues

IndexedDB Performance and IndexedDB v/s WebSQL performance comparison

不羁岁月 提交于 2019-11-29 09:27:43
问题 WebSQL and IndexedDB are both DB API for accessing (CRUD) the underlying embedded database in the web browser. Which, if I am correct, is like SQL for accessing (CRUD) any client-server database like Oracle etc. (in many case support for both WebSQL and IndexedDB is available on same browser) So, does it mean that both WebSQL and IndexedDB are accessing (CRUD) the same underlying embedded database and if that it the case then it will have same performance on all web browsers! But I think that

HTML5 WebSQL: how to know when a db transaction finishes?

試著忘記壹切 提交于 2019-11-29 00:52:16
问题 I've the following code that gets a json recordset and insert some data in three different tables on the client Web Sql storage. How can I intercept the end of databaseSync() function? What I want to do is display an alert or better an ajax spinner gif in order to inform the user when the sync is complete. Many thanks for your help, ciao! function databaseSync() { // table one $.getJSON("http://192.168.1.40:8888/iOS/mobilesrv/index.php?ACT=one", function(json) { $.each(json.results, function

phonegap - sqlite or Indexed DB?

你说的曾经没有我的故事 提交于 2019-11-29 00:52:10
问题 I am web developer starting with phonegap. I need to create one app for iPhone, android and Windows Phone 8. I need to store some data (too big for localStorage) locally. I don't know witch solution is the best: Phonegap provides Storage (based on WebSQL - which is deprecated), but it is not supported by windows phone. Is there any plugin to fill this gap? I read about Indexed DB, but I haven't used it before and it is not very intuitive for me. I am not sure if it is fully supported in all

How to delete a database in WebSQL programmatically?

主宰稳场 提交于 2019-11-28 21:59:07
问题 I am new to Web SQL database and I use it to save data in a local database in a web page.  I can create a database by var db = openDatabase('database', '1.0', 'my database', 2 * 1024 * 1024);  and I can create a table by doing this db.transaction(function (tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS mytable (blah,blah)'); });  I can delete the table by db.transaction(function (tx) { tx.executeSql('DROP TABLE mytable'); });  but is there a way to delete the database programmatically? 回答1:

Local Storage, Session storage, Web storage, web database and cookies in HTML5

吃可爱长大的小学妹 提交于 2019-11-28 19:12:10
What is the difference between these concepts, and when should I use one in particular? Does this listing also contain different names for the same general concept? HTML5 local storage HTML5 session storage HTML5 web storage HTML5 web database Cookies DA. HTML5 web storage is a generic umbrella term for the new client-side data storage options. Local Storage is persistent and scoped to the domain. At the moment two flavors are usually mentioned: 'default': stores things in name/value pairs Web SQL (aka Web Database): uses an SQL database Session Storage is non persistent and scoped only to the

JavaScript Library to Bridge IndexedDB and WebSQL

心不动则不痛 提交于 2019-11-28 15:34:29
问题 I'm curious if there is a library or a project out there to provide a generic interface to IndexedDB or to WebSQL, depending on user's browser's support. If they're using Chrome/Safari, use WebSQL, if they're using Firefox or Internet Explorer, use IndexedDB. The poster of this question appears to have homegrown a solution, but did not provide any source code. 回答1: You might want to go with Lawnchair, which is quite well known, as mentioned by Guido Tapia in the question that you link to.