org.hsqldb.scriptio
Class ScriptWriterText
java.lang.Object
org.hsqldb.scriptio.ScriptWriterBase
org.hsqldb.scriptio.ScriptWriterText
- public class ScriptWriterText
- extends ScriptWriterBase
Handles all logging to file operations. A log consists of three blocks:
LOG BLOCK: SQL statements logged since startup or the last CHECKPOINT
A related use for this class is for saving a current snapshot of the
database data to a user-defined file. This happens in the SHUTDOWN COMPACT
process or done as a result of the SCRIPT command. In this case, the
DATA block contains the CACHED table data as well.
- Since:
- 1.7.2
- Version:
- 1.7.2
- Author:
- fredt@users
Methods inherited from class org.hsqldb.scriptio.ScriptWriterBase |
close, finishStream, newScriptWriter, setWriteDelay, size, sync, writeAll, writeDDL, writeExistingData, writeSingleColumnResult, writeTableInit, writeTableTerm |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BYTES_LINE_SEP
public static byte[] BYTES_LINE_SEP
ScriptWriterText
public ScriptWriterText(Database db,
String file,
boolean includeCachedData,
boolean newFile)
throws HsqlException
initBuffers
protected void initBuffers()
- Specified by:
initBuffers
in class ScriptWriterBase
openFile
protected void openFile()
throws HsqlException
- File is opened in append mode although in current usage the file
never pre-exists
- Overrides:
openFile
in class ScriptWriterBase
- Throws:
HsqlException
writeRow
public void writeRow(int sid,
Table table,
Object[] data)
throws HsqlException,
IOException
- Throws:
HsqlException
IOException
writeDataTerm
protected void writeDataTerm()
throws IOException
- Specified by:
writeDataTerm
in class ScriptWriterBase
- Throws:
IOException
writeSessionId
protected void writeSessionId(int sid)
throws IOException
- Specified by:
writeSessionId
in class ScriptWriterBase
- Throws:
IOException
writeLogStatement
public void writeLogStatement(String s,
int sid)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeDeleteStatement
public void writeDeleteStatement(int sid,
Table table,
Object[] data)
throws HsqlException,
IOException
- Throws:
HsqlException
IOException
writeSequenceStatement
public void writeSequenceStatement(int sid,
NumberSequence seq)
throws HsqlException,
IOException
- Throws:
HsqlException
IOException
Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.