-
2 Nov 2011 1:47 AM #21
It looks likes stores and models are defined before db connection. Can you define dbconnection outside
regApplication before store and model.
-
25 Nov 2011 3:46 AM #22
SqliteProxy License?
SqliteProxy License?
@ tomalex(): I would also like to use your SqliteProxy in my app based on PhoneGap and Sencha Touch. Which license is your SqliteProxy? My app I create will be eventually a commercial product some day. That's why I'm asking.
Thanks for your answer!
-
25 Nov 2011 4:00 AM #23
-
25 Nov 2011 4:01 AM #24
-
12 Dec 2011 12:52 AM #25
Thanks! I was exactly looking for this.
I'm gonna try your plugin in my app.
-
11 Jan 2012 8:21 AM #26
Mysql to Sqlite
Mysql to Sqlite
Hi,
great Plugin tomalex0.
Is there a way to put data from a webserver (ajax) into the sqlite database on first startup of the app?
After, i want to use the app offline and check only for updates when the phone is online.
Thank you for your response.
Regards, Adrian
-
27 Jan 2012 11:58 AM #27
UNIQUE KEYS
UNIQUE KEYS
Hey there really appreciate your work. I'm using your code for some time and it really helps me.
At the moment I try to create a table where to fields together build an Unique key
This is my sql to create the table but I don't know how I can do this like it is intended with an sqlitestorage.Code:CREATE TABLE test(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, Content TEXT, groupid INTEGER, leaguecode INTEGER, leaguetext TEXT, leaguetype TEXT, wertungsmodus TEXT, UNIQUE (groupid, leaguecode) ON CONFLICT REPLACE);
Normally I build it like the one above and I know I can set fieldOption to 'UNIQUE'. This works perfectly. But this time the field groupdid and leaguecode build together a UNIQUE key.PHP Code:var dbconnval = {
dbName: "app24",
dbDescription: "app24_db",
};
Ext.DbConnection = new Ext.Sqlite.Connection(dbconnval);
Ext.regModel('othergroups', {
fields: [
{
name: 'id',
type: 'int',
fieldOption: 'NOT NULL PRIMARY KEY AUTOINCREMENT'
}, {
name: 'content',
type: 'string'
}, {
name: 'groupid',
type: 'int'
}, {
name: 'leaguecode',
type: 'int'
}, {
name: 'leaguetext',
type: 'string'
}, {
name: 'leaguetype',
type: 'string'
}, {
name: 'wertungsmodus',
type: 'string'
}
],
proxy: {
type: 'sqlitestorage',
dbConfig: {
tablename: 'othergroups',
dbConn: Ext.DbConnection.dbConn
},
reader: {
idProperty: 'ID'
}
},
writer: {
type: 'json'
}
});
I hope you can help me point me to the right point. Thanks for any help
-
27 Jan 2012 7:26 PM #28
@goeast
Sorry for late reply, i also thought to implement a feature like that. I will update you once it is finished.
@eryx
I haven't came across situation like this
Code:UNIQUE (groupid, leaguecode) ON CONFLICT REPLACE
. Probably we need to change the way query is build in create section. Let me check and will let you
-
29 Jan 2012 9:16 AM #29
Thanks!
Thanks!
Thanks that would be amazing if you could implement something like that.
Greetings Eryx
-
30 Jan 2012 8:24 AM #30
Hi,
For time being can you try something like below mentioned field options and it is based on query that you have shown, its not a proper way but will do the trick.
Code:fields: [{ name: 'ID', type: 'int', fieldOption: 'NOT NULL PRIMARY KEY AUTOINCREMENT' },{ name: 'Content', type: 'string' }, { name: 'groupid', type: 'int' },{ name: 'leaguecode', type: 'int' },{ name : 'leaguetext', type: 'string' },{ name : 'wertungsmodus', type : 'string', fieldOption : ',UNIQUE (groupid, leaguecode) ON CONFLICT REPLACE' }]


Reply With Quote
. You are free to use this, it will be always open.