Class SqlJetOptions
java.lang.Object
org.tmatesoft.sqljet.core.internal.table.SqlJetOptions
- All Implemented Interfaces:
ISqlJetOptions
- Author:
- TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
-
Field Summary
Fields inherited from interface org.tmatesoft.sqljet.core.table.ISqlJetOptions
SQLJET_DEFAULT_ENCODING, SQLJET_DEFAULT_ENCODING_PROPERTY, SQLJET_DEFAULT_FILE_FORMAT, SQLJET_DEFAULT_FILE_FORMAT_PROPERTY, SQLJET_LEGACY_FILE_FORMAT, SQLJET_LEGACY_FILE_FORMAT_PROPERTY
-
Constructor Summary
Constructors -
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.java.lang.String
toString()
boolean
verifySchemaVersion
(boolean throwIfStale) Verify schema cookie and return true if it is unchanged by other process.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
SqlJetOptions
- Throws:
SqlJetException
-
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getSchemaVersion
Description copied from interface:ISqlJetOptions
Schema cookie. Changes with each schema change.- Specified by:
getSchemaVersion
in interfaceISqlJetOptions
- Returns:
- the schemaCookie
- Throws:
SqlJetException
-
getFileFormat
Description copied from interface:ISqlJetOptions
File format of schema layer.- Specified by:
getFileFormat
in interfaceISqlJetOptions
- Returns:
- the fileFormat
- Throws:
SqlJetException
-
getCacheSize
Description copied from interface:ISqlJetOptions
Size of the page cache.- Specified by:
getCacheSize
in interfaceISqlJetOptions
- Returns:
- the pageCacheSize
- Throws:
SqlJetException
-
isAutovacuum
Description copied from interface:ISqlJetOptions
Use freelist if false. Autovacuum if true.- Specified by:
isAutovacuum
in interfaceISqlJetOptions
- Returns:
- the autovacuum
- Throws:
SqlJetException
-
getEncoding
Description copied from interface:ISqlJetOptions
Db text encoding.- Specified by:
getEncoding
in interfaceISqlJetOptions
- Returns:
- the encoding
- Throws:
SqlJetException
-
isLegacyFileFormat
Description copied from interface:ISqlJetOptions
Checks if legacy file format is used for the new databases.- Specified by:
isLegacyFileFormat
in interfaceISqlJetOptions
- Throws:
SqlJetException
-
setLegacyFileFormat
Description copied from interface:ISqlJetOptions
Instructs SQLJet to use legacy file format for all new databases.- Specified by:
setLegacyFileFormat
in interfaceISqlJetOptions
- Throws:
SqlJetException
-
getUserVersion
Description copied from interface:ISqlJetOptions
The user cookie. Used by the application.- Specified by:
getUserVersion
in interfaceISqlJetOptions
- Returns:
- the userCookie
- Throws:
SqlJetException
-
isIncrementalVacuum
Description copied from interface:ISqlJetOptions
Incremental-vacuum flag.- Specified by:
isIncrementalVacuum
in interfaceISqlJetOptions
- Returns:
- the incrementalVacuum
- Throws:
SqlJetException
-
setSchemaVersion
Description copied from interface:ISqlJetOptions
Set schema version. It can be performed only in active transaction.- Specified by:
setSchemaVersion
in interfaceISqlJetOptions
- Throws:
SqlJetException
-
verifySchemaVersion
Description copied from interface:ISqlJetOptions
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.- Specified by:
verifySchemaVersion
in interfaceISqlJetOptions
- Returns:
- true of schema has not been changed
- Throws:
SqlJetException
-
changeSchemaVersion
Description copied from interface:ISqlJetOptions
Change SchemaCookie. It can be performed only in active transaction- Specified by:
changeSchemaVersion
in interfaceISqlJetOptions
- Throws:
SqlJetException
-
setUserVersion
Description copied from interface:ISqlJetOptions
Set user's cookie. It can be performed only in active transaction.- Specified by:
setUserVersion
in interfaceISqlJetOptions
- Throws:
SqlJetException
-
setFileFormat
Description copied from interface:ISqlJetOptions
Set file format. It's allowed only on new empty data base. It can't be performed in active transaction.- Specified by:
setFileFormat
in interfaceISqlJetOptions
- Throws:
SqlJetException
-
setCacheSize
Description copied from interface:ISqlJetOptions
Set page cache's size. It can be performed only in active transaction.- Specified by:
setCacheSize
in interfaceISqlJetOptions
- Throws:
SqlJetException
-
setAutovacuum
Description copied from interface:ISqlJetOptions
Set autovacuum flag. It's allowed only on new empty data base. It can't be performed in active transaction.- Specified by:
setAutovacuum
in interfaceISqlJetOptions
- Throws:
SqlJetException
-
setEncoding
Description copied from interface:ISqlJetOptions
Set encoding. It's allowed only on new empty data base. It can't be performed in active transaction.- Specified by:
setEncoding
in interfaceISqlJetOptions
- Throws:
SqlJetException
-
setIncrementalVacuum
Description copied from interface:ISqlJetOptions
Set incremental vacuum flag. It's allowed only on new empty data base. It can't be performed in active transaction.- Specified by:
setIncrementalVacuum
in interfaceISqlJetOptions
- Throws:
SqlJetException
-