nl_tokens: Returns a { @link Ext . device . sqlite . Database } instance . If the database with specified name does not exist it will be created . If the creationCallback is provided the database is created with the empty string as its version regardless of the specified version .
pl_tokens: function ( config ) { if ( config . name == null ) { Ext . Logger . error ( 'Ext.device.SQLite#openDatabase: You must specify a `name` of the database.' ) ; return null ; } if ( config . version == null ) { Ext . Logger . error ( 'Ext.device.SQLite#openDatabase: You must specify a `version` of the database.' ) ; return null ; } if ( config . displayName == null ) { Ext . Logger . error ( 'Ext.device.SQLite#openDatabase: You must specify a `displayName` of the database.' ) ; return null ; } if ( config . estimatedSize == null ) { Ext . Logger . error ( 'Ext.device.SQLite#openDatabase: You must specify a `estimatedSize` of the database.' ) ; return null ; } var database = null ; var result = Ext . device . Communicator . send ( { command : 'SQLite#openDatabase' , sync : true , name : config . name , version : config . version , displayName : config . displayName , estimatedSize : config . estimatedSize , callbacks : { // `creationCallback != null` is checked for internal logic in native plugin code creationCallback : ! config . creationCallback ? null : function ( ) { config . creationCallback . call ( config . scope || this , database ) ; } } , <mask> : config . scope || this } ) ; if ( result ) { if ( result . error ) { Ext . Logger . error ( result . error ) ; return null ; } database = Ext . create ( 'Ext.device.sqlite.Database' , result . id , result . version ) ; return database ; } return null ; }