Hybrid View
-
8 Sep 2011 12:51 AM #1
SqliteProxy
SqliteProxy
I used to work with sqlite storage for while but didn't thought to write down a separate proxy until i came across http://www.sencha.com/forum/showthre...roxy.IndexedDB by grgur . So heavily depending on his code set and help from Lisimba I tried to write down another sqliteproxy for sencha touch. This is just in initial stage.
I write down the proxy based on implementing a Demo Functionality and it works fine for it. Usecase of others will be different. So please have a look and let me know your feed back.
You can find code and demo implementation under
SqliteProxy-Github
Note : Sencha guys already planned for this.
-
19 Sep 2011 12:50 AM #2
Thanks a lot, i'm just starting with Sencha and this is the first thing that i was looking into.
-
19 Sep 2011 1:07 AM #3
Nice to know that this turned out to be helpful for you. If you come across any issues please let me know
-
20 Sep 2011 1:24 PM #4
how can i change the Proxy.dbConfig.dbQuery of a sqliteproxy after definition of the store or model
i want to press a button and change the criteria of the selected rows of the table, i have tried this when updating
successfully executing the update query or select some dataCode:var p = myStore.getProxy(); p.queryDB(p.dbConfig.dbConn, 'Update table set column=300;');
but now i want to change the dbquery of the storage and i cant find how to do thisCode:function querySuccess(tx, results) { document.getElementById('total').innerHTML=results.rows.item(0).Num+' Total'; } var p = this.store.getProxy(); p.queryDB(p.dbConfig.dbConn, 'select count(*) as Num FROM table;',querySuccess);
im just starting with sencha and js in general, thanks for your helpCode:var p = this.store.getProxy(); p.dbconfig.dbQuery = 'Select * from table order by column desc Limit 30';
-
20 Sep 2011 6:33 PM #5
Can you try
after setting the dbQueryCode:this.store.load();
-
20 Sep 2011 11:19 PM #6
thanks, my error was actually dbconfig should be dbConfig

thanks for your helpCode:var p = this.store.getProxy(); p.dbConfig.dbQuery = 'Select * from table order by column desc Limit 30'; this.store.load();


Reply With Quote