Package org.tmatesoft.sqljet.core.table
Interface ISqlJetOptions
- All Known Implementing Classes:
SqlJetOptions
public interface ISqlJetOptions
Database options.
- Author:
- TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SqlJetEncodingDefault encoding.static final StringName of system property for default encoding.static final intDefault file format.static final StringName of system property for default file format.static final booleanLegacy file format support.static final StringName of system property for legacy file format support. -
Method Summary
Modifier and TypeMethodDescriptionvoidChange SchemaCookie.intSize of the page cache.Db text encoding.intFile format of schema layer.intSchema cookie.intThe user cookie.booleanUse freelist if false.booleanIncremental-vacuum flag.booleanChecks if legacy file format is used for the new databases.voidsetAutovacuum(boolean autovacuum) Set autovacuum flag.voidsetCacheSize(int pageCacheSize) Set page cache's size.voidsetEncoding(SqlJetEncoding encoding) Set encoding.voidsetFileFormat(int fileFormat) Set file format.voidsetIncrementalVacuum(boolean incrementalVacuum) Set incremental vacuum flag.voidsetLegacyFileFormat(boolean flag) Instructs SQLJet to use legacy file format for all new databases.voidsetSchemaVersion(int version) Set schema version.voidsetUserVersion(int userCookie) Set user's cookie.booleanverifySchemaVersion(boolean throwIfStale) Verify schema cookie and return true if it is unchanged by other process.
-
Field Details
-
SQLJET_DEFAULT_ENCODING_PROPERTY
Name of system property for default encoding.- See Also:
-
SQLJET_DEFAULT_ENCODING
Default encoding. -
SQLJET_LEGACY_FILE_FORMAT_PROPERTY
Name of system property for legacy file format support.- See Also:
-
SQLJET_LEGACY_FILE_FORMAT
static final boolean SQLJET_LEGACY_FILE_FORMATLegacy file format support. -
SQLJET_DEFAULT_FILE_FORMAT_PROPERTY
Name of system property for default file format.- See Also:
-
SQLJET_DEFAULT_FILE_FORMAT
static final int SQLJET_DEFAULT_FILE_FORMATDefault file format.
-
-
Method Details
-
getFileFormat
File format of schema layer.- Returns:
- the fileFormat
- Throws:
SqlJetException
-
setFileFormat
Set file format. It's allowed only on new empty data base. It can't be performed in active transaction.- Parameters:
fileFormat-- Throws:
SqlJetException
-
isAutovacuum
Use freelist if false. Autovacuum if true.- Returns:
- the autovacuum
- Throws:
SqlJetException
-
setAutovacuum
Set autovacuum flag. It's allowed only on new empty data base. It can't be performed in active transaction.- Parameters:
autovacuum-- Throws:
SqlJetException
-
isIncrementalVacuum
Incremental-vacuum flag.- Returns:
- the incrementalVacuum
- Throws:
SqlJetException
-
setIncrementalVacuum
Set incremental vacuum flag. It's allowed only on new empty data base. It can't be performed in active transaction.- Parameters:
incrementalVacuum-- Throws:
SqlJetException
-
getCacheSize
Size of the page cache.- Returns:
- the pageCacheSize
- Throws:
SqlJetException
-
setCacheSize
Set page cache's size. It can be performed only in active transaction.- Parameters:
pageCacheSize-- Throws:
SqlJetException
-
getEncoding
Db text encoding.- Returns:
- the encoding
- Throws:
SqlJetException
-
setEncoding
Set encoding. It's allowed only on new empty data base. It can't be performed in active transaction.- Parameters:
encoding-- Throws:
SqlJetException
-
isLegacyFileFormat
Checks if legacy file format is used for the new databases.- Throws:
SqlJetException
-
setLegacyFileFormat
Instructs SQLJet to use legacy file format for all new databases.- Throws:
SqlJetException
-
getSchemaVersion
Schema cookie. Changes with each schema change.- Returns:
- the schemaCookie
- Throws:
SqlJetException
-
setSchemaVersion
Set schema version. It can be performed only in active transaction.- Parameters:
version-- Throws:
SqlJetException
-
changeSchemaVersion
Change SchemaCookie. It can be performed only in active transaction- Throws:
SqlJetException
-
verifySchemaVersion
Verify schema cookie and return true if it is unchanged by other process. If throwIfStale is true then throw exception if cookie is changed by other process.- Parameters:
throwIfStale-- Returns:
- true of schema has not been changed
- Throws:
SqlJetException
-
getUserVersion
The user cookie. Used by the application.- Returns:
- the userCookie
- Throws:
SqlJetException
-
setUserVersion
Set user's cookie. It can be performed only in active transaction.- Parameters:
userCookie-- Throws:
SqlJetException
-