PDA

View Full Version : Access Web SQL storage from sencha Application



snithya
10 Feb 2011, 10:36 PM
Hi,

I would like to know if its possible to access and use data from Web SQL storage from the Sencha Touch Application? If yes are there any sample applications or examples.

malkandari
9 May 2011, 1:57 PM
snithya,

have you figured it out? I'm trying to find a solution for this too.

Thank You,

bdvr
9 May 2011, 7:13 PM
I'm using WebSql in my current project, so yes it can be done. ST provides no built-in support for WebSql, so we're pretty much on our own. Perhaps they are waiting for IndexedDB, but I'm not. No native support for joins, complex where clauses, aggregate functions? No thanks!

I ended up writing some custom objects to make working with the db and creating SQL statements a bit easier. I find the concept of proxies that only do CRUD to be a bit too simplistic when I have queries with all kinds of joins, where clauses, and aggregate functions, as well as business objects with methods that do more than one operation on more than one table in a transaction. I guess proxies work well with LocalStorage for fairly trivial things, but I ended up bypassing proxies, and instead opted to have methods on my models and stores with custom ad-hoc SQL.

Maybe others have had different approaches? I'll see if I can post some example code soon.

dmillasich
9 May 2011, 7:33 PM
I for one would be very grateful for some example code as well.

kortovos
9 May 2011, 11:11 PM
The basics:
http://html5doctor.com/introducing-web-sql-databases/

Good tutorial into versioning:
http://blog.maxaller.name/2010/03/html5-web-sql-database-intro-to-versioning-and-migrations/

dmillasich
11 May 2011, 10:37 AM
@kortovos

thank you

mitesh1818
4 Oct 2013, 3:24 AM
hello friends..

what is difference between Websql and Sqlite data base..??