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 File
File name for in memory database.static final 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 TypeMethodDescriptionstatic SqlJetMapDb
protected void
Reads database schema and options.runReadTransaction
(ISqlJetMapTransaction transaction) runSynchronized
(ISqlJetMapTransaction transaction) runTransaction
(SqlJetTransactionMode mode, ISqlJetMapTransaction transaction) 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
-
Field Details
-
IN_MEMORY
File name for in memory database. -
MODULE_NAME
- See Also:
-
-
Constructor Details
-
SqlJetMapDb
- Parameters:
file
- database file.writable
- true if caller needs write access to the database.
-
-
Method Details
-
open
- Throws:
SqlJetException
-
runTransaction
public 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
- Parameters:
transaction
- to run.- Returns:
- result of
ISqlJetMapTransaction.run(SqlJetMapDb)
call. - Throws:
SqlJetException
-
runReadTransaction
- 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
-