Package org.tmatesoft.sqljet.core.map
Class SqlJetMapDb
java.lang.Object
org.tmatesoft.sqljet.core.table.engine.SqlJetEngine
org.tmatesoft.sqljet.core.map.SqlJetMapDb
- Author:
- TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final java.io.File
File name for in memory database.static final java.lang.String
Fields inherited from class org.tmatesoft.sqljet.core.table.engine.SqlJetEngine
btree, dbHandle, file, FILE_SYSTEM_MANAGER, fileSystem, open, writable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateMap
(java.lang.String mapName) getMap
(java.lang.String mapName) getMapDef
(java.lang.String mapName) java.util.Set<java.lang.String>
static SqlJetMapDb
open
(java.io.File file, boolean writable) protected void
Reads database schema and options.java.lang.Object
runReadTransaction
(ISqlJetMapTransaction transaction) java.lang.Object
runSynchronized
(ISqlJetMapTransaction transaction) java.lang.Object
runTransaction
(SqlJetTransactionMode mode, ISqlJetMapTransaction transaction) java.lang.Object
runWriteTransaction
(ISqlJetMapTransaction transaction) Methods inherited from class org.tmatesoft.sqljet.core.table.engine.SqlJetEngine
beginTransaction, checkOpen, close, closeResources, commit, finalize, getBusyHandler, getCacheSize, getFile, getFileSystem, getJournalMode, getMutex, getOptions, getSafetyLevel, getSchemaInternal, getTransactionMode, isInTransaction, isOpen, isWritable, open, refreshSchema, registerFileSystem, rollback, runEngineTransaction, runSynchronized, setBusyHandler, setCacheSize, setJournalMode, setSafetyLevel, unregisterFileSystem
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
IN_MEMORY
public static final java.io.File IN_MEMORYFile name for in memory database. -
MODULE_NAME
public static final java.lang.String MODULE_NAME- See Also:
-
-
Constructor Details
-
SqlJetMapDb
public SqlJetMapDb(java.io.File file, boolean writable) - Parameters:
file
- database file.writable
- true if caller needs write access to the database.
-
-
Method Details
-
open
- Throws:
SqlJetException
-
runTransaction
public java.lang.Object runTransaction(SqlJetTransactionMode mode, ISqlJetMapTransaction transaction) throws SqlJetException - Parameters:
mode
- mode in which to run transaction.transaction
- transaction to run.- Returns:
- result of
ISqlJetMapTransaction.run(SqlJetMapDb)
call. - Throws:
SqlJetException
-
runWriteTransaction
public java.lang.Object runWriteTransaction(ISqlJetMapTransaction transaction) throws SqlJetException - Parameters:
transaction
- to run.- Returns:
- result of
ISqlJetMapTransaction.run(SqlJetMapDb)
call. - Throws:
SqlJetException
-
runReadTransaction
public java.lang.Object runReadTransaction(ISqlJetMapTransaction transaction) throws SqlJetException - Parameters:
transaction
- transaction to run.- Returns:
- result of
ISqlJetMapTransaction.run(SqlJetMapDb)
call. - Throws:
SqlJetException
-
runSynchronized
- Parameters:
transaction
- transaction to run.- Returns:
- result of
ISqlJetMapTransaction.run(SqlJetMapDb)
call. - Throws:
SqlJetException
-
readSchema
Description copied from class:SqlJetEngine
Reads database schema and options.- Overrides:
readSchema
in classSqlJetEngine
- Throws:
SqlJetException
-
getMapNames
- Returns:
- set of the map names stored in this database.
- Throws:
SqlJetException
-
getMapDef
- Parameters:
mapName
- name of the map to get definition for.- Returns:
- definition of the map with the specified name.
- Throws:
SqlJetException
-
createMap
- Parameters:
mapName
- name of the map to created.- Returns:
- map that has been created.
- Throws:
SqlJetException
-
getMap
- Parameters:
mapName
- name of the map to get.- Returns:
- map table with the name specified.
- Throws:
SqlJetException
-