public class Recover
extends org.h2.util.Tool
implements org.h2.store.DataHandler
Constructor and Description |
---|
Recover() |
Modifier and Type | Method and Description |
---|---|
void |
checkPowerOff()
INTERNAL
|
void |
checkWritingAllowed()
INTERNAL
|
static void |
execute(java.lang.String dir,
java.lang.String db)
Dumps the contents of a database to a SQL script file.
|
org.h2.value.CompareMode |
getCompareMode()
Return compare mode.
|
java.lang.String |
getDatabasePath()
INTERNAL
|
org.h2.util.SmallLRUCache<java.lang.String,java.lang.String[]> |
getLobFileListCache()
INTERNAL
|
org.h2.store.LobStorageInterface |
getLobStorage()
INTERNAL
|
java.lang.Object |
getLobSyncObject()
INTERNAL
|
int |
getMaxLengthInplaceLob()
INTERNAL
|
org.h2.util.TempFileDeleter |
getTempFileDeleter()
INTERNAL
|
static void |
main(java.lang.String... args)
Options are case sensitive.
|
org.h2.store.FileStore |
openFile(java.lang.String name,
java.lang.String mode,
boolean mustExist)
INTERNAL
|
static java.io.InputStream |
readBlobMap(java.sql.Connection conn,
long lobId,
long precision)
INTERNAL
|
static java.io.Reader |
readClobMap(java.sql.Connection conn,
long lobId,
long precision)
INTERNAL
|
int |
readLob(long lobId,
byte[] hmac,
long offset,
byte[] buff,
int off,
int length)
INTERNAL
|
void |
runTool(java.lang.String... args)
Dumps the contents of a database file to a human readable text file.
|
public static void main(java.lang.String... args) throws java.sql.SQLException
[-help] or [-?] | Print the list of options |
[-dir <dir>] | The directory (default: .) |
[-db <database>] | The database name (all databases if not set) |
[-trace] | Print additional trace information |
[-transactionLog] | Print the transaction log |
args
- the command line argumentsjava.sql.SQLException
- on failurepublic void runTool(java.lang.String... args) throws java.sql.SQLException
runTool
in class org.h2.util.Tool
args
- the command line argumentsjava.sql.SQLException
- on failurepublic static java.io.InputStream readBlobMap(java.sql.Connection conn, long lobId, long precision) throws java.sql.SQLException
conn
- to uselobId
- id of the LOB streamprecision
- not usedjava.sql.SQLException
- on failurepublic static java.io.Reader readClobMap(java.sql.Connection conn, long lobId, long precision) throws java.lang.Exception
conn
- to uselobId
- id of the LOB streamprecision
- not usedjava.sql.SQLException
- on failurejava.lang.Exception
public static void execute(java.lang.String dir, java.lang.String db) throws java.sql.SQLException
dir
- the directorydb
- the database name (null for all databases)java.sql.SQLException
- on failurepublic java.lang.String getDatabasePath()
getDatabasePath
in interface org.h2.store.DataHandler
public org.h2.store.FileStore openFile(java.lang.String name, java.lang.String mode, boolean mustExist)
openFile
in interface org.h2.store.DataHandler
name
- the file namemode
- the modemustExist
- whether the file must already existpublic void checkPowerOff()
checkPowerOff
in interface org.h2.store.DataHandler
public void checkWritingAllowed()
checkWritingAllowed
in interface org.h2.store.DataHandler
public int getMaxLengthInplaceLob()
getMaxLengthInplaceLob
in interface org.h2.store.DataHandler
public java.lang.Object getLobSyncObject()
getLobSyncObject
in interface org.h2.store.DataHandler
public org.h2.util.SmallLRUCache<java.lang.String,java.lang.String[]> getLobFileListCache()
getLobFileListCache
in interface org.h2.store.DataHandler
public org.h2.util.TempFileDeleter getTempFileDeleter()
getTempFileDeleter
in interface org.h2.store.DataHandler
public org.h2.store.LobStorageInterface getLobStorage()
getLobStorage
in interface org.h2.store.DataHandler
public int readLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length)
readLob
in interface org.h2.store.DataHandler
lobId
- the lob idhmac
- the message authentication codeoffset
- the offset within the lobbuff
- the target bufferoff
- the offset within the target bufferlength
- the number of bytes to readpublic org.h2.value.CompareMode getCompareMode()
org.h2.store.DataHandler
getCompareMode
in interface org.h2.store.DataHandler