forked from tomalex0/SenchaTouch-v2-SqliteProxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SqliteConnection.js
46 lines (37 loc) · 995 Bytes
/
SqliteConnection.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// var a = {dbName : "test",dbVersion : "1.0",dbDescription: "testdb",dbSize : 65536};
Ext.define('Ext.Sqlite.Connection', {
extend: 'Ext.util.Observable',
/**
* @cfg {String} dbName
* Name of database
*/
dbName: undefined,
/**
* @cfg {String} version
* database version. If different than current, use updatedb event to update database
*/
dbVersion: '1.19',
/**
* @cfg {String} dbDescription
* Description of the database
*/
dbDescription: '',
/**
* @cfg {String} dbSize
* Max storage size in bytes
*/
dbSize: 5 * 1024 * 1024,
/**
* @cfg {String} dbConn
* database connection object
*/
dbConn : undefined,
constructor : function(config) {
config = config || {};
Ext.apply(this, config);
var me = this;
me.callParent([this]);
me.dbConn = openDatabase(me.dbName,me.dbVersion, me.dbDescription, me.dbSize);
return me;
}
});