Package org.tmatesoft.sqljet.core.table
Interface ISqlJetOptions
-
- All Known Implementing Classes:
SqlJetOptions
public interface ISqlJetOptionsDatabase options.
-
-
Field Summary
Fields Modifier and Type Field Description static SqlJetEncodingSQLJET_DEFAULT_ENCODINGDefault encoding.static java.lang.StringSQLJET_DEFAULT_ENCODING_PROPERTYName of system property for default encoding.static intSQLJET_DEFAULT_FILE_FORMATDefault file format.static java.lang.StringSQLJET_DEFAULT_FILE_FORMAT_PROPERTYName of system property for default file format.static booleanSQLJET_LEGACY_FILE_FORMATLegacy file format support.static java.lang.StringSQLJET_LEGACY_FILE_FORMAT_PROPERTYName of system property for legacy file format support.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchangeSchemaVersion()Change SchemaCookie.intgetCacheSize()Size of the page cache.SqlJetEncodinggetEncoding()Db text encoding.intgetFileFormat()File format of schema layer.intgetSchemaVersion()Schema cookie.intgetUserVersion()The user cookie.booleanisAutovacuum()Use freelist if false.booleanisIncrementalVacuum()Incremental-vacuum flag.booleanisLegacyFileFormat()Checks 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 Detail
-
SQLJET_DEFAULT_ENCODING_PROPERTY
static final java.lang.String SQLJET_DEFAULT_ENCODING_PROPERTY
Name of system property for default encoding.- See Also:
- Constant Field Values
-
SQLJET_DEFAULT_ENCODING
static final SqlJetEncoding SQLJET_DEFAULT_ENCODING
Default encoding.
-
SQLJET_LEGACY_FILE_FORMAT_PROPERTY
static final java.lang.String SQLJET_LEGACY_FILE_FORMAT_PROPERTY
Name of system property for legacy file format support.- See Also:
- Constant Field Values
-
SQLJET_LEGACY_FILE_FORMAT
static final boolean SQLJET_LEGACY_FILE_FORMAT
Legacy file format support.
-
SQLJET_DEFAULT_FILE_FORMAT_PROPERTY
static final java.lang.String SQLJET_DEFAULT_FILE_FORMAT_PROPERTY
Name of system property for default file format.- See Also:
- Constant Field Values
-
SQLJET_DEFAULT_FILE_FORMAT
static final int SQLJET_DEFAULT_FILE_FORMAT
Default file format.
-
-
Method Detail
-
getFileFormat
int getFileFormat() throws SqlJetExceptionFile format of schema layer.- Returns:
- the fileFormat
- Throws:
SqlJetException
-
setFileFormat
void setFileFormat(int fileFormat) throws SqlJetExceptionSet file format. It's allowed only on new empty data base. It can't be performed in active transaction.- Parameters:
fileFormat-- Throws:
SqlJetException
-
isAutovacuum
boolean isAutovacuum() throws SqlJetExceptionUse freelist if false. Autovacuum if true.- Returns:
- the autovacuum
- Throws:
SqlJetException
-
setAutovacuum
void setAutovacuum(boolean autovacuum) throws SqlJetExceptionSet autovacuum flag. It's allowed only on new empty data base. It can't be performed in active transaction.- Parameters:
autovacuum-- Throws:
SqlJetException
-
isIncrementalVacuum
boolean isIncrementalVacuum() throws SqlJetExceptionIncremental-vacuum flag.- Returns:
- the incrementalVacuum
- Throws:
SqlJetException
-
setIncrementalVacuum
void setIncrementalVacuum(boolean incrementalVacuum) throws SqlJetExceptionSet 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
int getCacheSize() throws SqlJetExceptionSize of the page cache.- Returns:
- the pageCacheSize
- Throws:
SqlJetException
-
setCacheSize
void setCacheSize(int pageCacheSize) throws SqlJetExceptionSet page cache's size. It can be performed only in active transaction.- Parameters:
pageCacheSize-- Throws:
SqlJetException
-
getEncoding
SqlJetEncoding getEncoding() throws SqlJetException
Db text encoding.- Returns:
- the encoding
- Throws:
SqlJetException
-
setEncoding
void setEncoding(SqlJetEncoding encoding) throws SqlJetException
Set encoding. It's allowed only on new empty data base. It can't be performed in active transaction.- Parameters:
encoding-- Throws:
SqlJetException
-
isLegacyFileFormat
boolean isLegacyFileFormat() throws SqlJetExceptionChecks if legacy file format is used for the new databases.- Throws:
SqlJetException
-
setLegacyFileFormat
void setLegacyFileFormat(boolean flag) throws SqlJetExceptionInstructs SQLJet to use legacy file format for all new databases.- Throws:
SqlJetException
-
getSchemaVersion
int getSchemaVersion() throws SqlJetExceptionSchema cookie. Changes with each schema change.- Returns:
- the schemaCookie
- Throws:
SqlJetException
-
setSchemaVersion
void setSchemaVersion(int version) throws SqlJetExceptionSet schema version. It can be performed only in active transaction.- Parameters:
version-- Throws:
SqlJetException
-
changeSchemaVersion
void changeSchemaVersion() throws SqlJetExceptionChange SchemaCookie. It can be performed only in active transaction- Throws:
SqlJetException
-
verifySchemaVersion
boolean verifySchemaVersion(boolean throwIfStale) throws SqlJetExceptionVerify 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
int getUserVersion() throws SqlJetExceptionThe user cookie. Used by the application.- Returns:
- the userCookie
- Throws:
SqlJetException
-
setUserVersion
void setUserVersion(int userCookie) throws SqlJetExceptionSet user's cookie. It can be performed only in active transaction.- Parameters:
userCookie-- Throws:
SqlJetException
-
-