Page 6 of 6 FirstFirst ... 456
Results 51 to 56 of 56

Thread: SqliteProxy for ST2

  1. #51
    Sencha Premium Member
    Join Date
    Jul 2009
    Posts
    138
    Vote Rating
    4
      0  

    Default

    I took the code, and tweaked it to support ST1. It doesn't seem that the implementation supports an 'id' field which is set independently (e.g., such as a server). Is that supported under ST2? If I try to set it up that way on ST1, the server id's do get written to sql properly, but the getInsertRecordFunc and getUpdateRecordFunc overwrite the id in memory to the rowid. So now there is no reference to the server id. But if I re-read the data from sql, it will set the id properly, since applyDataToModel calls 'new Model(data, rowid)', which will set the id to the server id and internalId to rowid.

    UPDATE ON MY QUESTION ABOVE: I just came across the following thread post which answers the question - http://www.sencha.com/forum/showthre...l=1#post805349. Basically, the id field is "reserved" to store rowid, and a server record id should use a different name. It would certainly be nice if the proxy could be smart enough to allow developer use of id and use a different mechanism to track rowid.

  2. #52
    Sencha User
    Join Date
    Oct 2011
    Posts
    6
    Vote Rating
    0
      0  

    Default Thanks for reply

    Thanks for reply.

  3. #53
    Sencha User
    Join Date
    Mar 2010
    Posts
    1
    Vote Rating
    0
      0  

    Default

    i want to say this is GREAT work, but i have encounter a problem, do you have any idea if this proxy can be use with list paging? i have tried , but none of them works, it always display all record or some record that come with "LIMIT X",

    Code:
    var p = store.getProxy();
    p.queryDB(p.getDb(), 'SELECT * FROM master_site WHERE condition = \'' +my_condition + '\' ;',querySuccess);
    
    store.load();
    on my view :
    Code:
    {
                    xtype: 'list',
                    id: 'siteList',
                    ui: 'round',
                   store: store,
                    plugins: [
                        {
                            xclass: 'Ext.plugin.ListPaging',
                            autoPaging: true
                        }
                    ]
    }
    any help will be greatly appreciated thx

  4. #54
    Sencha Premium Member
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    587
    Vote Rating
    88
      0  

  5. #55
    Sencha User
    Join Date
    Feb 2013
    Posts
    10
    Vote Rating
    1
      0  

    Default sqliteproxy for SQLIte database

    Hi tomalex,

    Just wondering if your proxy is good for app which is based on PhoneGap + ST2 and SQlite database (not web sql).
    I have a SQLite database with some values added and want to use it in my app which i am creating using PhoneGap 2.3 and ST2.

    Thank you

    Quote Originally Posted by tomalex0 View Post
    Hi,

    I have ported sqliteproxy to work with ST2.

    You can find previous thread
    http://www.sencha.com/forum/showthre...Proxy&p=661960

    Updated Code can be found under .
    https://github.com/tomalex0/SenchaTouch-v2-SqliteProxy

  6. #56
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    688
    Vote Rating
    50
      0  

    Default

    @mobileDev1600 , ST2 has its own proxy for SQLite databases, check the docs and here http://vadimpopa.com/sencha-touch-2-...xy-for-sqlite/
    Github https://github.com/vadimpopa
    Sencha tips and articles : http://vadimpopa.com
    Twitter: @vadimvpopa

Page 6 of 6 FirstFirst ... 456

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •