public abstract class WSQLAbstractDatabase extends AbstractDatabase
| Modifier and Type | Field and Description |
|---|---|
protected SQLDatabase |
database |
protected static Logger |
logger |
protected Array<String> |
objectStoreNames |
protected boolean |
opened |
errorHandler, messages, name, version| Constructor and Description |
|---|
WSQLAbstractDatabase() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the current database.
|
protected void |
createFileStore(SQLTransaction tx) |
protected Transaction |
createTransaction(String[] storeNames,
Transaction.Mode mode) |
void |
delete(DatabaseCallback callback)
Remove the current database from client browser.
|
protected void |
deleteDBTables(DatabaseCallback callback,
SQLTransaction.SQLStatementErrorCallback errorCallback) |
protected void |
deleteDBTables(SQLTransaction tx,
DatabaseCallback callback,
SQLTransaction.SQLStatementErrorCallback errorCallback,
boolean removeSystemTables) |
protected void |
deleteFromDbVersions(DatabaseCallback callback,
SQLTransaction.SQLStatementErrorCallback errorCallback) |
protected void |
doDelete(DatabaseCallback callback) |
protected void |
doDelete(DatabaseCallback callback,
SQLTransaction.SQLStatementErrorCallback errorCallback) |
protected void |
doOpen(DatabaseCallback callback) |
protected SQLTransaction.SQLStatementErrorCallback |
getDeleteErrorHandler(DatabaseCallback callback) |
protected abstract <K,V> WSQLAbstractObjectStore<K,V> |
getObjectStore(String storeName,
WSQLTransaction transaction) |
boolean |
isOpen()
Return true if the current database is open.
|
boolean |
isSupported()
Return true if Crux Database is supported by current browser.
|
protected abstract void |
updateDatabaseStructure(SQLTransaction tx,
DatabaseCallback callback) |
add, add, delete, delete, get, getName, getTransaction, getTransaction, getVersion, open, put, put, setDefaultErrorHandler, setName, setVersion, useIndexedDB, useWebSQLprotected static Logger logger
protected boolean opened
protected SQLDatabase database
public void close()
Databasepublic void delete(DatabaseCallback callback)
Databasecallback - called when operation is completedpublic boolean isOpen()
Databasepublic boolean isSupported()
Databaseprotected Transaction createTransaction(String[] storeNames, Transaction.Mode mode)
createTransaction in class AbstractDatabaseprotected void doOpen(DatabaseCallback callback)
doOpen in class AbstractDatabaseprotected void doDelete(DatabaseCallback callback)
protected SQLTransaction.SQLStatementErrorCallback getDeleteErrorHandler(DatabaseCallback callback)
protected void doDelete(DatabaseCallback callback, SQLTransaction.SQLStatementErrorCallback errorCallback)
protected void deleteDBTables(SQLTransaction tx, DatabaseCallback callback, SQLTransaction.SQLStatementErrorCallback errorCallback, boolean removeSystemTables)
protected void deleteDBTables(DatabaseCallback callback, SQLTransaction.SQLStatementErrorCallback errorCallback)
protected void deleteFromDbVersions(DatabaseCallback callback, SQLTransaction.SQLStatementErrorCallback errorCallback)
protected void createFileStore(SQLTransaction tx)
protected abstract void updateDatabaseStructure(SQLTransaction tx, DatabaseCallback callback)
protected abstract <K,V> WSQLAbstractObjectStore<K,V> getObjectStore(String storeName, WSQLTransaction transaction)
Copyright © 2015. All rights reserved.