This class implements the common store functionality
extends goog.DisposableInstance Method Summary | |
createSchema(?Array defs, boolean= opt_ifNotExists) Creates tables and indicies in the target database. | |
createTriggers(?Array defs) Creates triggers specified in definitions. Will first attempt to drop the trigger with this name first. | |
disposeInternal() Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' {@code disposeInternal} method. Everywhere else the public {@code dispose} method must be used. For example: mypackage.MyClass = function() { goog.base(this); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { goog.base(this, 'disposeInternal'); // Dispose logic specific to MyClass. ... }; | |
dropSchema(?Array defs) Drops tables and indicies in a target database. | |
ensureStoreExists() Makes sure that tables needed for the store exist and are up to date. | |
getCachedData() Creates in memory cache of data that is stored in the tables. | |
getCreateStatement_(?Object def, boolean= opt_ifNotExists) ⇒ string Generates an SQLITE CREATE statement from a definition object. | |
getCreateTriggerStatement_(string onStr, ?Object def, string notExistsStr) ⇒ string Generates an SQLITE CREATE TRIGGER statement from a definition array. | |
getDatabaseInternal() ⇒ ?goog.gears.Database Gets the underlying database. | |
getDropStatement_(?Object def) ⇒ string Generates an SQLITE DROP statement from a definition array. | |
getName() ⇒ string Returns the name of the store. | |
getStoreVersion() ⇒ number Returns the version number for the specified store | |
hasInSchema_(string type, string name) ⇒ boolean Returns true if the database contains the index or table | |
hasIndex(string name) ⇒ boolean Returns true if the index exists in the database | |
hasTable(string name) ⇒ boolean Returns true if the table exists in the database | |
hasTrigger(string name) ⇒ boolean | |
informOtherStores() Informs other stores that this store exists . | |
loadData() Preloads any applicable data into the tables. | |
removeStore() Removes the tables for the MessageStore | |
removeStoreVersion() Removes the version number for the specified store | |
setStoreVersion_(number version) Sets the version number for the specified store | |
updateStore(number persistedVersion) Updates the tables for the message store in the case where they are out of date. |