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 SqlJetEncoding
Default encoding.static final String
Name of system property for default encoding.static final int
Default file format.static final String
Name of system property for default file format.static final boolean
Legacy file format support.static final String
Name of system property for legacy file format support. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Change SchemaCookie.int
Size of the page cache.Db text encoding.int
File format of schema layer.int
Schema cookie.int
The user cookie.boolean
Use freelist if false.boolean
Incremental-vacuum flag.boolean
Checks if legacy file format is used for the new databases.void
setAutovacuum
(boolean autovacuum) Set autovacuum flag.void
setCacheSize
(int pageCacheSize) Set page cache's size.void
setEncoding
(SqlJetEncoding encoding) Set encoding.void
setFileFormat
(int fileFormat) Set file format.void
setIncrementalVacuum
(boolean incrementalVacuum) Set incremental vacuum flag.void
setLegacyFileFormat
(boolean flag) Instructs SQLJet to use legacy file format for all new databases.void
setSchemaVersion
(int version) Set schema version.void
setUserVersion
(int userCookie) Set user's cookie.boolean
verifySchemaVersion
(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
-