Class LLDatabaseSQLite
java.lang.Object
com.io7m.looseleaf.database.sqlite.LLDatabaseSQLite
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longGet the value associated with the given key, if any.getAll()booleanisClosed()longstatic LLDatabaseTypeOpen an SQLite database.Atomically read, update, and delete values in the database.
-
Method Details
-
open
Open an SQLite database.- Parameters:
file- The database file- Returns:
- The database
- Throws:
IOException- On errors
-
dataSizeApproximate
- Specified by:
dataSizeApproximatein interfaceLLDatabaseType- Returns:
- The approximate size of the database in bytes
- Throws:
IOException- On errors
-
keyCountApproximate
- Specified by:
keyCountApproximatein interfaceLLDatabaseType- Returns:
- The approximate number of keys in the database
- Throws:
IOException- On errors
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceLLDatabaseType- Returns:
trueif the store has been closed
-
readUpdateDelete
Description copied from interface:LLDatabaseTypeAtomically read, update, and delete values in the database.- Specified by:
readUpdateDeletein interfaceLLDatabaseType- Parameters:
rud- The RUD operation- Returns:
- The read keys
- Throws:
IOException- On errors
-
get
Description copied from interface:LLDatabaseTypeGet the value associated with the given key, if any.- Specified by:
getin interfaceLLDatabaseType- Parameters:
key- The key- Returns:
- The value, if any
- Throws:
IOException- On errors
-
getAll
- Specified by:
getAllin interfaceLLDatabaseType- Returns:
- The entire database
- Throws:
IOException- On errors
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-