Package org.tmatesoft.sqljet.core.table
Interface ISqlJetOptions
-
- All Known Implementing Classes:
SqlJetOptions
public interface ISqlJetOptions
Database options.
-
-
Field Summary
Fields Modifier and Type Field Description static SqlJetEncoding
SQLJET_DEFAULT_ENCODING
Default encoding.static java.lang.String
SQLJET_DEFAULT_ENCODING_PROPERTY
Name of system property for default encoding.static int
SQLJET_DEFAULT_FILE_FORMAT
Default file format.static java.lang.String
SQLJET_DEFAULT_FILE_FORMAT_PROPERTY
Name of system property for default file format.static boolean
SQLJET_LEGACY_FILE_FORMAT
Legacy file format support.static java.lang.String
SQLJET_LEGACY_FILE_FORMAT_PROPERTY
Name of system property for legacy file format support.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
changeSchemaVersion()
Change SchemaCookie.int
getCacheSize()
Size of the page cache.SqlJetEncoding
getEncoding()
Db text encoding.int
getFileFormat()
File format of schema layer.int
getSchemaVersion()
Schema cookie.int
getUserVersion()
The user cookie.boolean
isAutovacuum()
Use freelist if false.boolean
isIncrementalVacuum()
Incremental-vacuum flag.boolean
isLegacyFileFormat()
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 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 SqlJetException
File format of schema layer.- Returns:
- the fileFormat
- Throws:
SqlJetException
-
setFileFormat
void setFileFormat(int fileFormat) throws SqlJetException
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
boolean isAutovacuum() throws SqlJetException
Use freelist if false. Autovacuum if true.- Returns:
- the autovacuum
- Throws:
SqlJetException
-
setAutovacuum
void setAutovacuum(boolean autovacuum) throws SqlJetException
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
boolean isIncrementalVacuum() throws SqlJetException
Incremental-vacuum flag.- Returns:
- the incrementalVacuum
- Throws:
SqlJetException
-
setIncrementalVacuum
void setIncrementalVacuum(boolean incrementalVacuum) throws SqlJetException
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
int getCacheSize() throws SqlJetException
Size of the page cache.- Returns:
- the pageCacheSize
- Throws:
SqlJetException
-
setCacheSize
void setCacheSize(int pageCacheSize) throws SqlJetException
Set 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 SqlJetException
Checks if legacy file format is used for the new databases.- Throws:
SqlJetException
-
setLegacyFileFormat
void setLegacyFileFormat(boolean flag) throws SqlJetException
Instructs SQLJet to use legacy file format for all new databases.- Throws:
SqlJetException
-
getSchemaVersion
int getSchemaVersion() throws SqlJetException
Schema cookie. Changes with each schema change.- Returns:
- the schemaCookie
- Throws:
SqlJetException
-
setSchemaVersion
void setSchemaVersion(int version) throws SqlJetException
Set schema version. It can be performed only in active transaction.- Parameters:
version
-- Throws:
SqlJetException
-
changeSchemaVersion
void changeSchemaVersion() throws SqlJetException
Change SchemaCookie. It can be performed only in active transaction- Throws:
SqlJetException
-
verifySchemaVersion
boolean verifySchemaVersion(boolean throwIfStale) throws SqlJetException
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
int getUserVersion() throws SqlJetException
The user cookie. Used by the application.- Returns:
- the userCookie
- Throws:
SqlJetException
-
setUserVersion
void setUserVersion(int userCookie) throws SqlJetException
Set user's cookie. It can be performed only in active transaction.- Parameters:
userCookie
-- Throws:
SqlJetException
-
-