Hybrid View

  1. #1
    Sencha User tomalex0's Avatar
    Join Date
    Apr 2009
    Location
    San Jose, CA
    Posts
    589
    Vote Rating
    16
    tomalex0 will become famous soon enough

      0  

    Default 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.


    Sencha Touch Demos

    IosToggleField Forum - Github
    Form Validation
    Forum - Github
    Iphone Settings Menu
    Forum
    Sqlite Storage & Login Manifest
    Forum
    KitchenSink MVC
    Forum - Github
    SqliteProxy-v1 Forum - Github
    SqliteProxy-v2
    Forum - Github
    Arshaw Fullcalendar Forum - Github






  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    temolesto is on a distinguished road

      0  

    Thumbs up


    Thanks a lot, i'm just starting with Sencha and this is the first thing that i was looking into.

  3. #3
    Sencha User tomalex0's Avatar
    Join Date
    Apr 2009
    Location
    San Jose, CA
    Posts
    589
    Vote Rating
    16
    tomalex0 will become famous soon enough

      0  

    Default


    Nice to know that this turned out to be helpful for you. If you come across any issues please let me know
    Sencha Touch Demos

    IosToggleField Forum - Github
    Form Validation
    Forum - Github
    Iphone Settings Menu
    Forum
    Sqlite Storage & Login Manifest
    Forum
    KitchenSink MVC
    Forum - Github
    SqliteProxy-v1 Forum - Github
    SqliteProxy-v2
    Forum - Github
    Arshaw Fullcalendar Forum - Github






  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    temolesto is on a distinguished road

      0  

    Default


    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

    Code:
    var p = myStore.getProxy();
    p.queryDB(p.dbConfig.dbConn, 'Update table set column=300;');
    successfully executing the update query or select some data
    Code:
    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);
    but now i want to change the dbquery of the storage and i cant find how to do this
    Code:
    var p = this.store.getProxy();
    p.dbconfig.dbQuery = 'Select * from table order by column desc Limit 30';
    im just starting with sencha and js in general, thanks for your help

  5. #5
    Sencha User tomalex0's Avatar
    Join Date
    Apr 2009
    Location
    San Jose, CA
    Posts
    589
    Vote Rating
    16
    tomalex0 will become famous soon enough

      0  

    Default


    Can you try

    Code:
    this.store.load();
    after setting the dbQuery
    Sencha Touch Demos

    IosToggleField Forum - Github
    Form Validation
    Forum - Github
    Iphone Settings Menu
    Forum
    Sqlite Storage & Login Manifest
    Forum
    KitchenSink MVC
    Forum - Github
    SqliteProxy-v1 Forum - Github
    SqliteProxy-v2
    Forum - Github
    Arshaw Fullcalendar Forum - Github






  6. #6
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    temolesto is on a distinguished road

      0  

    Default


    thanks, my error was actually dbconfig should be dbConfig

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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi