org.cruxframework.crux.core.client.db
Class WSQLAbstractDatabase
java.lang.Object
org.cruxframework.crux.core.client.db.AbstractDatabase
org.cruxframework.crux.core.client.db.WSQLAbstractDatabase
- All Implemented Interfaces:
- Database
public abstract class WSQLAbstractDatabase
- extends AbstractDatabase
HTML5 AbstractDatabase based on Web SQL (http://www.w3.org/TR/webdatabase/).
- Author:
- Thiago da Rosa de Bustamante
| Methods inherited from class org.cruxframework.crux.core.client.db.AbstractDatabase |
add, add, delete, delete, get, getName, getTransaction, getTransaction, getVersion, open, put, put, setDefaultErrorHandler, setName, setVersion, useIndexedDB, useWebSQL |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static Logger logger
opened
protected boolean opened
database
protected SQLDatabase database
objectStoreNames
protected Array<String> objectStoreNames
WSQLAbstractDatabase
public WSQLAbstractDatabase()
close
public void close()
- Description copied from interface:
Database
- Close the current database.
delete
public void delete(DatabaseCallback callback)
- Description copied from interface:
Database
- Remove the current database from client browser.
- Parameters:
callback - called when operation is completed
isOpen
public boolean isOpen()
- Description copied from interface:
Database
- Return true if the current database is open.
- Returns:
- true if open
isSupported
public boolean isSupported()
- Description copied from interface:
Database
- Return true if Crux Database is supported by current browser.
- Returns:
- true if supported
createTransaction
protected Transaction createTransaction(String[] storeNames,
Transaction.Mode mode)
- Specified by:
createTransaction in class AbstractDatabase
doOpen
protected void doOpen(DatabaseCallback callback)
- Specified by:
doOpen in class AbstractDatabase
doDelete
protected void doDelete(DatabaseCallback callback)
getDeleteErrorHandler
protected SQLTransaction.SQLStatementErrorCallback getDeleteErrorHandler(DatabaseCallback callback)
doDelete
protected void doDelete(DatabaseCallback callback,
SQLTransaction.SQLStatementErrorCallback errorCallback)
deleteDBTables
protected void deleteDBTables(SQLTransaction tx,
DatabaseCallback callback,
SQLTransaction.SQLStatementErrorCallback errorCallback,
boolean removeSystemTables)
deleteDBTables
protected void deleteDBTables(DatabaseCallback callback,
SQLTransaction.SQLStatementErrorCallback errorCallback)
deleteFromDbVersions
protected void deleteFromDbVersions(DatabaseCallback callback,
SQLTransaction.SQLStatementErrorCallback errorCallback)
createFileStore
protected void createFileStore(SQLTransaction tx)
updateDatabaseStructure
protected abstract void updateDatabaseStructure(SQLTransaction tx,
DatabaseCallback callback)
getObjectStore
protected abstract <K,V> WSQLAbstractObjectStore<K,V> getObjectStore(String storeName,
WSQLTransaction transaction)
Copyright © 2014. All rights reserved.