Questions tagged [web-sql]

Web SQL Database is a SQL-based API allowing a web pages to store and retrieve structured data locally. It is based on, but not the same as SQLite.

Web SQL Database is a SQL-based API allowing web browsers/extensions/apps to store structured data locally. It is based on SQLite and, in practice, has been implemented solely on SQLite.

The API is currently supported by Google Chrome, Opera and Safari. But, The W3C has abandoned Web SQL in favor of Web Storage and the Indexed Database API. From the Web SQL spec:

... specification work has stopped. The specification reached an impasse: all interested implementors have used the same SQL backend (SQLite), but we need multiple independent implementations to proceed along a standardisation path.

Mozilla will not implement Web SQL DB, opting to implement IndexedDB instead, and Microsoft has hinted that they are more likely to implement IndexedDB than Web SQL.

Resources

855 questions
4
votes
1 answer

why foreign key doesn't work in websql..?

i try to use foreign key in my app using web sql.. i test it in chrome.. no error.. but when i test with manual insert to table img (contain FK) i expect to fail.. but insert is still succes.. this is my code.. please help me.. …
4
votes
3 answers

delete row from result set in web sql with javascript

I understand that the result set from web sql isn't quite an array, more of an object? I'm cycling through a result set and to speed things up I'd like to remove a row once it's been found. I've tried "delete" and "splice", the former does nothing…
Kaijin
  • 53
  • 1
  • 1
  • 10
4
votes
1 answer

backbone.js 3-way model sync

I am working on a (HTML5) web app that uses client-side persistent storage, which is periodically synced to the server. I recently came across backbone.js and am very impressed. However, I'm a little confused as to how to implement my (assumedly…
Dave
  • 1,304
  • 1
  • 15
  • 19
4
votes
1 answer

Best database option for PhoneGap applications?

I am looking for an evolved, stable and proven database solution for PhoneGap applications, which is not limited in size. I have been working with LocalStorage for over a year, and it works quite well. At least if you don't hit the 5 MB limit. And…
asp_net
  • 3,567
  • 3
  • 31
  • 58
4
votes
2 answers

Prevent SQL injection in WebSQL database? (How to handle quotes in data?)

I'm currently importing an xml export of a mysql database into a websql database for use in an online mobile experience. Everything works fine and dandy until there are double quotes in whatever string I am inserting. Normally, in PHP I would be…
Roi
  • 1,597
  • 16
  • 19
4
votes
1 answer

JavaScript returning the value from an inner function

I am trying to get the value from an inner function. Why is domain always returning undefined? I think this is because the webSQL executes asynchronously. I need to get the value of domain at this point in the program before I can proceed. I…
Jon Wells
  • 4,191
  • 9
  • 40
  • 69
4
votes
1 answer

Optimizing WebSQL Local Database Population

I am trying to optimize the speed that my Local database populates in a Web app that is being developed. Currently, it uses PHP to access the Database and then inserts that data into the local database using Javascript. Problem is, anything more…
Will
  • 733
  • 8
  • 23
3
votes
1 answer

WebSQL transaction works in the console, not in code

I'm trying to write a Sencha Touch 2.0 WebSql proxy that supports tree-data. I started from tomalex0's WebSql/Sqlite proxy. https://github.com/tomalex0 When modifying the script I ran into a strange debugging issue: (I'm using Chrome 17.0.963.78…
VDP
  • 6,340
  • 4
  • 31
  • 53
3
votes
2 answers

Java - unparseable date, need format to match "GMT-0400"

I have the following Java: DateFormat formatter = new SimpleDateFormat( "EEE MMM dd yyyy HH:mm:ss zZ (zzzz)", Locale.ENGLISH); Calendar cal = Calendar.getInstance(); cal.set(2011, Calendar.APRIL,…
Sarah Vessels
  • 30,930
  • 33
  • 155
  • 222
3
votes
1 answer

HTML5 WebSQL optimization/caching options?

I currently have an HTML5 web app that utilizes localstorage/websql/app cache. Now that the database size has grown to around 12MB, the queries that are returning 1000s of records at a time are causing long load times. The client does not want to…
Fostah
  • 2,947
  • 4
  • 56
  • 78
3
votes
1 answer

Web Database - tx.executeSql callback not running every time

I have an HTML5 website built using jQuery Mobile. On my index.htm page I have an ahref. When I click on that link I run a function which does a tx.executeSql and the callback method is run which then navigates to the new page. The works fine the…
James K
  • 909
  • 10
  • 26
3
votes
2 answers

How to find the location of database created using HTML5?

I am developing a playbook app, where I am creating multiple databases. Can I get the location of the file/db created. I need to delete that Database, but I couldn't find a way to drop it, so I am planning to delete the file that it is stored in.
3
votes
1 answer

HTML5 Client Storage: WebSqlDatabase vs. WebStorage vs. Indexed Database

I have some questions concerning the abilities of client storage in HTML5. From what I've found so far there are three different possibilities: WebSQLDatabase: Supports client site SQL-Tables, which are stored in a SQLite Database. This standard is…
BrianM
  • 1,523
  • 2
  • 9
  • 5
3
votes
1 answer

Get size of HTML5 WebDB (Web SQL) database from javascript

I'm using the WebDB spec in HTML5 to create an offline database for persistent offline storage. However, I need a way to get the current size of the database from javascript. The only thing I can think of is to loop through everything in the…
Varun Singh
  • 1,676
  • 3
  • 18
  • 25
3
votes
1 answer

Synchronise local WebSQL/IndexedDB database with 'pre-built' database file?

Is there any plan to make it possible to download (or synchronise from) a 'pre-built' database file, so to speak, for use with a local web browser database like WebSQL or IndexedDB? At the moment, to add or update a local database it's necessary to…
Sam Dutton
  • 14,775
  • 6
  • 54
  • 64