public interface ISqlJetBtree
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SQLITE_FILE_HEADER |
static SqlJetAutoVacuumMode |
SQLJET_DEFAULT_AUTOVACUUM |
static ISqlJetMemoryPointer |
zMagicHeader |
Modifier and Type | Method and Description |
---|---|
void |
beginStmt()
Start a statement subtransaction.
|
void |
beginTrans(SqlJetTransactionMode mode)
Attempt to start a new transaction.
|
void |
clearTable(int table,
int[] nChange)
Delete all information from a single table in the database.
|
void |
close()
Close an open database and invalidate all cursors.
|
void |
closeAllCursors() |
void |
commit()
Do both phases of a commit.
|
void |
commitPhaseOne(java.lang.String master)
This routine does the first phase of a two-phase commit.
|
void |
commitPhaseTwo()
Commit the transaction currently in progress.
|
void |
commitStmt()
Commit the statment subtransaction currently in progress.
|
void |
copyFile(ISqlJetBtree from)
Copy the complete content of from.
|
int |
createTable(java.util.Set<SqlJetBtreeTableCreateFlags> flags)
Create a new BTree table.
|
int |
dropTable(int table)
Erase all information in a table and add the root of the table to the
freelist.
|
void |
enter()
Enter a mutex on the given BTree object.
|
SqlJetAutoVacuumMode |
getAutoVacuum()
Return the value of the 'auto-vacuum' property.
|
int |
getCacheSize() |
ISqlJetBtreeCursor |
getCursor(int table,
boolean wrFlag,
ISqlJetKeyInfo keyInfo)
Create a new cursor for the BTree whose root is on the page iTable.
|
ISqlJetDbHandle |
getDb() |
java.io.File |
getDirname()
Return the pathname of the directory that contains the database file.
|
java.io.File |
getFilename()
Return the full pathname of the underlying database file.
|
SqlJetPagerJournalMode |
getJournalMode() |
java.io.File |
getJournalname()
Return the pathname of the journal file for this database.
|
int |
getMeta(int idx)
Read the meta-information out of a database file.
|
ISqlJetPager |
getPager()
Return the pager associated with a BTree.
|
int |
getPageSize()
Return the currently defined page size
|
int |
getReserve() |
SqlJetSafetyLevel |
getSafetyLevel() |
SqlJetSchema |
getSchema()
This function returns a pointer to a blob of memory associated with a
single shared-btree.
|
SqlJetTransactionMode |
getTransMode()
Get transaction mode
|
void |
incrVacuum()
A write-transaction must be opened before calling this function.
|
java.lang.String |
integrityCheck(int[] aRoot,
int nRoot,
int mxErr,
int[] nErr)
This routine does a complete check of the given BTree file.
|
boolean |
isInReadTrans()
Return true if a read (or write) transaction is active.
|
boolean |
isInStmt()
Return true if a statement transaction is active.
|
boolean |
isInTrans()
Return true if a transaction is active.
|
boolean |
isSchemaLocked()
Return true if another user of the same shared btree as the argument
handle holds an exclusive lock on the sqlite_master table.
|
boolean |
isSyncDisabled()
Return TRUE if the given btree is set to safety level 1.
|
void |
leave()
Exit the recursive mutex on a Btree.
|
void |
lockTable(int table,
boolean isWriteLock)
Obtain a lock on the table whose root page is iTab.
|
void |
open(java.io.File filename,
ISqlJetDbHandle db,
java.util.Set<SqlJetBtreeFlags> flags,
SqlJetFileType type,
java.util.Set<SqlJetFileOpenPermission> permissions)
Open a database file.
|
void |
rollback()
Rollback the transaction in progress.
|
void |
rollbackStmt()
Rollback the active statement subtransaction.
|
void |
savepoint(SqlJetSavepointOperation op,
int savepoint)
The second argument to this function, op, is always SAVEPOINT_ROLLBACK or
SAVEPOINT_RELEASE.
|
void |
setAutoVacuum(SqlJetAutoVacuumMode autoVacuum)
Change the 'auto-vacuum' property of the database.
|
void |
setCacheSize(int mxPage)
Change the limit on the number of pages allowed in the cache.
|
void |
setJournalMode(SqlJetPagerJournalMode mode) |
void |
setMaxPageCount(int mxPage)
Set the maximum page count for a database if mxPage is positive.
|
void |
setPageSize(int pageSize,
int nReserve)
Change the default pages size and the number of reserved bytes per page.
|
void |
setSafetyLevel(SqlJetSafetyLevel level)
Change the way data is synced to disk in order to increase or decrease
how well the database resists damage due to OS crashes and power
failures.
|
void |
setSchema(SqlJetSchema schema) |
void |
tripAllCursors(SqlJetErrorCode errCode)
This routine sets the state to CURSOR_FAULT and the error code to errCode
for every cursor on BtShared that pBtree references.
|
void |
updateMeta(int idx,
int value)
Write meta-information back into the database.
|
static final SqlJetAutoVacuumMode SQLJET_DEFAULT_AUTOVACUUM
static final java.lang.String SQLITE_FILE_HEADER
static final ISqlJetMemoryPointer zMagicHeader
void open(java.io.File filename, ISqlJetDbHandle db, java.util.Set<SqlJetBtreeFlags> flags, SqlJetFileType type, java.util.Set<SqlJetFileOpenPermission> permissions) throws SqlJetException
filename
- Name of database file to opendb
- Associated database connectionflags
- FlagsfsFlags
- Flags passed through to VFS openSqlJetException
void close() throws SqlJetException
SqlJetException
void setCacheSize(int mxPage)
mxPage
- void setSafetyLevel(SqlJetSafetyLevel level)
level
- SqlJetException
SqlJetSafetyLevel getSafetyLevel()
void setJournalMode(SqlJetPagerJournalMode mode)
SqlJetPagerJournalMode getJournalMode()
boolean isSyncDisabled()
void setPageSize(int pageSize, int nReserve) throws SqlJetException
pageSize
- nReserve
- SqlJetException
int getPageSize()
void setMaxPageCount(int mxPage) throws SqlJetException
mxPage
- SqlJetException
int getReserve()
void setAutoVacuum(SqlJetAutoVacuumMode autoVacuum) throws SqlJetException
autoVacuum
- SqlJetException
SqlJetAutoVacuumMode getAutoVacuum()
SqlJetException
SqlJetTransactionMode getTransMode()
void beginTrans(SqlJetTransactionMode mode) throws SqlJetException
mode
- SqlJetException
void commitPhaseOne(java.lang.String master) throws SqlJetException
master
- SqlJetException
void commitPhaseTwo() throws SqlJetException
SqlJetException
void commit() throws SqlJetException
SqlJetException
void rollback() throws SqlJetException
SqlJetException
void beginStmt() throws SqlJetException
SqlJetException
void commitStmt() throws SqlJetException
SqlJetException
void rollbackStmt() throws SqlJetException
SqlJetException
int createTable(java.util.Set<SqlJetBtreeTableCreateFlags> flags) throws SqlJetException
flags
- SqlJetException
boolean isInTrans()
boolean isInStmt()
boolean isInReadTrans()
SqlJetSchema getSchema()
void setSchema(SqlJetSchema schema)
schema
- boolean isSchemaLocked()
SqlJetException
void lockTable(int table, boolean isWriteLock)
iTab
- isWriteLock
- SqlJetException
void savepoint(SqlJetSavepointOperation op, int savepoint) throws SqlJetException
op
- iSavepoint
- SqlJetException
java.io.File getFilename()
java.io.File getDirname()
java.io.File getJournalname()
void copyFile(ISqlJetBtree from) throws SqlJetException
from
- SqlJetException
void incrVacuum() throws SqlJetException
SqlJetException
int dropTable(int table) throws SqlJetException
table
- SqlJetException
void clearTable(int table, int[] nChange) throws SqlJetException
table
- SqlJetException
int getMeta(int idx) throws SqlJetException
idx
- SqlJetException
void updateMeta(int idx, int value) throws SqlJetException
idx
- value
- SqlJetException
void tripAllCursors(SqlJetErrorCode errCode) throws SqlJetException
errCode
- SqlJetException
java.lang.String integrityCheck(int[] aRoot, int nRoot, int mxErr, int[] nErr) throws SqlJetException
SqlJetException
ISqlJetPager getPager() throws SqlJetException
SqlJetException
ISqlJetBtreeCursor getCursor(int table, boolean wrFlag, ISqlJetKeyInfo keyInfo) throws SqlJetException
table
- Index of root pagewrFlag
- true for writing. false for read-onlykeyInfo
- First argument to compare functionSqlJetException
void enter()
void leave()
int getCacheSize()
void closeAllCursors() throws SqlJetException
SqlJetException
ISqlJetDbHandle getDb()
Copyright © 2009-2010 TMate Software Ltd. All Rights Reserved.