-
30 Jan 2013 10:39 AM #181
size limitations
size limitations
Are the size limitations for storage limited to the amount of hard disk space on the user's device when using this solution?
When packaging with cordova, is this the right solution for storing and retrieving large video files (>500mb) on a users device for offline viewing? Maybe I need the Cordova SQLite plugins (for iOS)?
-
21 Feb 2013 1:23 AM #182
How to guarantee unique records?
How to guarantee unique records?
This proxy has brilliantly solved a lot of the problems I was having. Thank you.
I'm stuck, though, on one particular table, where I need to ensure that records are unique, and don't know how. This is my model:
Ideally, I would like to have a composite primary key on the fields 'survey_id' and 'question_id', as that would guarantee each row's uniqueness, but I haven't been able to find out how to create a composite key in a model. Having 'id' as unique would clearly guarantee that each row is unique, by virtue of the uniqueness of 'id', but doesn't stop repeated combinations of 'survey_id' and 'question_id'. Does anybody have any ideas?Code:Ext.define('LRS.model.Answers', { extend: 'Ext.data.Model', config: { fields: [ {name: 'id', type:'int'}, {name:'distribution_respondent_id',type:'int'}, {name:'survey_id', type:'int'}, {name:'question_id',type:'int'}, {name:'question_response_value', type:'string'}, {name:'response_skipped', type:'int'}, {name:'response_skipreason', type:'string'}, {name:'response_comment',type:'string'}, {name:'date', type: 'long'}, {name:'synced', type:'string'} ] }, identifier: 'uuid' });
-
21 Feb 2013 1:28 AM #183
Maybe I can be of help....
Apologies if I'm wrong on the following assumption (would be embarrassing on my own code!) but I don't believe that each table actually has an ID column; I think this is actually set from the auto-increment __ROWID__ on each websql/sqlite table (http://www.sqlite.org/autoinc.html). In that case your concerns about overriding the ID column as the primary key wouldn't apply, because strictly that column is not even part of the table's schema, in fact if you inspect the tables using the webkit dev tools, it doesn't even show.
So theoretically, you should be able to modify the create table method on the proxy (perhaps extend the proxy and have an additional config for an array of primary keys?), modifying the create table statement should be fairly easy:
http://stackoverflow.com/questions/7...ltiple-columns
Hope this helps!I blog about Sencha Touch at www.senchatouchdev.com
-
21 Feb 2013 1:30 AM #184
Sorry for hideously late reply (to billtallitsch)
If you package to native, this will still use websql, therefore it's subject to the 5mb limit. In fact, asking for more space in a native app is not a good idea. webview's do not handle that request well.
If you want more than 5mb you'll need to go ahead and use the plugin. I believe there's one for android too.I blog about Sencha Touch at www.senchatouchdev.com
-
21 Feb 2013 4:01 AM #185
composite primarykey
composite primarykey
Thanks for the information, shepsii, and for the suggestion. Excellent idea. I have a tendency to work with what I've got (i.e. lazily rely on other people's hard work), but modifying the proxy is a great suggestion.
-
21 Mar 2013 1:47 AM #186
-
21 Mar 2013 8:02 AM #187
Safari IOS has a 50MB limit so if you're doing a browser based application that's all you have. Web Views, which is what most "Native" apps actually use, also has this limit.
If you are using Cordova/PhoneGap to create a native app, there's a plugin that looks like it allows larger limits. I haven't used anything like this however so I can't be sure.
https://github.com/brodyspark/PhoneGap-SQLitePlugin-iOS
Thanks
Bob
-
15 Apr 2013 10:41 PM #188
Hi everyone,
I have a question with the sqlite proxy . Can the application's database be deleted if user delete the cookies, cache .. in iOS settings ?
-
15 Apr 2013 11:04 PM #189
No, the application database is not deleted or even effected when you clear cookies and data from "ios setting".
I have checked it in simulator.
-
15 Apr 2013 11:08 PM #190
My blog: http://vadimpopa.com


Reply With Quote
OM Exception 18: An attempt was made to break through the security policy of the user agent"
, you can delete websql databases by taping "clear cookies and data" button. If is native then yes, is not deleted.