org.h2.tools
public class Recover extends Tool implements DataHandler
Constructor and Description |
---|
Recover() |
Modifier and Type | Method and Description |
---|---|
void |
checkPowerOff()
INTERNAL
|
void |
checkWritingAllowed()
INTERNAL
|
static void |
execute(String dir,
String db)
Dumps the contents of a database to a SQL script file.
|
String |
getDatabasePath()
INTERNAL
|
String |
getLobCompressionAlgorithm(int type)
INTERNAL
|
Connection |
getLobConnection()
INTERNAL
|
SmallLRUCache<String,String[]> |
getLobFileListCache()
INTERNAL
|
LobStorage |
getLobStorage()
INTERNAL
|
Object |
getLobSyncObject()
INTERNAL
|
int |
getMaxLengthInplaceLob()
INTERNAL
|
TempFileDeleter |
getTempFileDeleter()
INTERNAL
|
static void |
main(String... args)
Options are case sensitive.
|
FileStore |
openFile(String name,
String mode,
boolean mustExist)
INTERNAL
|
static InputStream |
readBlob(String fileName)
INTERNAL
|
static Value.ValueBlob |
readBlobDb(Connection conn,
long lobId,
long precision)
INTERNAL
|
static Reader |
readClob(String fileName)
INTERNAL
|
static Value.ValueClob |
readClobDb(Connection conn,
long lobId,
long precision)
INTERNAL
|
int |
readLob(long lobId,
byte[] hmac,
long offset,
byte[] buff,
int off,
int length)
INTERNAL
|
void |
runTool(String... args)
Dumps the contents of a database file to a human readable text file.
|
isOption, printNoDatabaseFilesFound, setOut, showUsage, showUsageAndThrowUnsupportedOption, throwUnsupportedOption
public static void main(String... args) throws 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 |
args
- the command line argumentsSQLException
public void runTool(String... args) throws SQLException
runTool
in class Tool
args
- the command line argumentsSQLException
public static Reader readClob(String fileName) throws IOException
IOException
public static InputStream readBlob(String fileName) throws IOException
IOException
public static Value.ValueBlob readBlobDb(Connection conn, long lobId, long precision)
public static Value.ValueClob readClobDb(Connection conn, long lobId, long precision)
public static void execute(String dir, String db) throws SQLException
dir
- the directorydb
- the database name (null for all databases)SQLException
public String getDatabasePath()
getDatabasePath
in interface DataHandler
public FileStore openFile(String name, String mode, boolean mustExist)
openFile
in interface DataHandler
name
- the file namemode
- the modemustExist
- whether the file must already existpublic void checkPowerOff()
checkPowerOff
in interface DataHandler
public void checkWritingAllowed()
checkWritingAllowed
in interface DataHandler
public int getMaxLengthInplaceLob()
getMaxLengthInplaceLob
in interface DataHandler
public String getLobCompressionAlgorithm(int type)
getLobCompressionAlgorithm
in interface DataHandler
type
- the data type (CLOB or BLOB)public Object getLobSyncObject()
getLobSyncObject
in interface DataHandler
public SmallLRUCache<String,String[]> getLobFileListCache()
getLobFileListCache
in interface DataHandler
public TempFileDeleter getTempFileDeleter()
getTempFileDeleter
in interface DataHandler
public LobStorage getLobStorage()
getLobStorage
in interface DataHandler
public Connection getLobConnection()
getLobConnection
in interface DataHandler
public int readLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length)
readLob
in interface DataHandler
lobId
- the lobhmac
- the message authentication codeoffset
- the offset within the lobbuff
- the target bufferoff
- the offset within the target bufferlength
- the number of bytes to readCopyright © 2016 JBoss by Red Hat. All Rights Reserved.