X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/Connection1.html?ds=inline diff --git a/docs/source/Connection1.html b/docs/source/Connection1.html deleted file mode 100644 index ca70c36a..00000000 --- a/docs/source/Connection1.html +++ /dev/null @@ -1,99 +0,0 @@ - -
-// Asbtract base class for Connection classes -Ext.sql.Connection = function(config){ - Ext.apply(this, config); - Ext.sql.Connection.superclass.constructor.call(this); - - this.addEvents({ - open : true, - close: true - }); -}; - -Ext.extend(Ext.sql.Connection, Ext.util.Observable, { - maxResults: 10000, - openState : false, - - // abstract methods - open : function(file){ - }, - - close : function(){ - }, - - exec : function(sql){ - }, - - execBy : function(sql, args){ - }, - - query : function(sql){ - }, - - queryBy : function(sql, args){ - }, - - // protected/inherited method - isOpen : function(){ - return this.openState; - }, - - getTable : function(name, keyName){ - return new Ext.sql.Table(this, name, keyName); - }, - - createTable : function(o){ - var tableName = o.name; - var keyName = o.key; - var fs = o.fields; - if(!Ext.isArray(fs)){ // Ext fields collection - fs = fs.items; - } - var buf = []; - for(var i = 0, len = fs.length; i < len; i++){ - var f = fs[i], s = f.name; - switch(f.type){ - case "int": - case "bool": - case "boolean": - s += ' INTEGER'; - break; - case "float": - s += ' REAL'; - break; - default: - s += ' TEXT'; - } - if(f.allowNull === false || f.name == keyName){ - s += ' NOT NULL'; - } - if(f.name == keyName){ - s += ' PRIMARY KEY'; - } - if(f.unique === true){ - s += ' UNIQUE'; - } - - buf[buf.length] = s; - } - var sql = ['CREATE TABLE IF NOT EXISTS ', tableName, ' (', buf.join(','), ')'].join(''); - this.exec(sql); - } -}); - - -Ext.sql.Connection.getInstance = function(db, config){ - if(Ext.isAir){ // air - return new Ext.sql.AirConnection(config); - } else { // gears - return new Ext.sql.GearsConnection(config); - } -};- - \ No newline at end of file