Logo Search packages:      
Sourcecode: henplus version File versions  Download package

henplus::commands::DumpCommand Class Reference

Inheritance diagram for henplus::commands::DumpCommand:

henplus::AbstractCommand henplus::Interruptable henplus::Command

List of all members.


Detailed Description

Dump out and read that dump of a table; database-independently. This reads directly from the stream, so only needs not much memory, no matter the size of the file. --------------------------- (tabledump 'student' (dump-version 1 1) (henplus-version 0.3.3) (database-info 'MySQL - 3.23.47') (meta ('name', 'sex', 'student_id') ('STRING', 'STRING', 'INTEGER' )) (data ('Megan','F',1) ('Joseph','M',2) ('Kyle','M',3) ('Mac Donald\'s','M',44)) (rows 4)) ---------------------------

QUICK AND DIRTY HACK .. NOT YET NICE. Too long.

Author:
Henner Zeller

Definition at line 71 of file DumpCommand.java.


Public Member Functions

void checkSupported (int version) throws IllegalArgumentException
Iterator complete (CommandDispatcher disp, String partialCommand, String lastWord)
 DumpCommand (ListUserObjectsCommand tc, LoadCommand lc)
int execute (SQLSession session, String cmd, String param)
void expect (LineNumberReader in, char ch) throws IOException
String[] getCommandList ()
String getLongDescription (String cmd)
String getShortDescription ()
String getSynopsis (String cmd)
synchronized void interrupt ()
boolean isComplete (String command)
MetaProperty[] parseMetaData (LineNumberReader in) throws IOException
boolean participateInCommandCompletion ()
boolean requiresValidSession (String cmd)
void shutdown ()

Static Public Attributes

static final int EXEC_FAILED = 2
static final int SUCCESS = 0
static final int SYNTAX_ERROR = 1

Protected Member Functions

int argumentCount (String command)

Static Package Functions

 [static initializer]

Package Attributes

String lastProblem = null
long problemCount = 0

Private Member Functions

int dumpTable (SQLSession session, String tabName, String whereClause, PrintStream dumpOut, String fileEncoding) throws Exception
void finishProblemReports ()
LineNumberReader openInputReader (String fileName, String fileEncoding) throws IOException
PrintStream openOutputStream (String fileName, String encoding) throws IOException
void printWidth (PrintStream out, String s, int width, boolean comma)
void quoteString (PrintStream out, String in)
void raiseException (LineNumberReader in, String msg) throws IOException
Number readNumber (LineNumberReader in) throws IOException
String readString (LineNumberReader in) throws IOException
int readTableDump (LineNumberReader reader, String fileEncoding, SQLSession session, boolean hot, int commitPoint) throws IOException, SQLException, InterruptedException
String readToken (LineNumberReader in) throws IOException
void reportProblem (String msg)
int retryReadDump (String fileName, SQLSession session, int commitPoint)
boolean skipWhite (Reader in) throws IOException
String stripQuotes (String value)

Private Attributes

final LoadCommand _fileOpener
volatile boolean _running
final ListUserObjectsCommand _tableCompleter
final String FILE_ENCODING = "UTF-8"

Static Private Attributes

static final int DUMP_VERSION = 1
static final int HP_BLOB = 7
static final int HP_CLOB = 8
static final int HP_DATE = 4
static final int HP_DOUBLE = 3
static final int HP_INTEGER = 1
static final int HP_NUMERIC = 2
static final int HP_STRING = 0
static final int HP_TIME = 5
static final int HP_TIMESTAMP = 6
static final Map JDBCTYPE2TYPENAME = new HashMap()
static final String NULL_STR = "NULL"
static final int PROGRESS_WIDTH = 65
static final String TYPES [] = new String [ 9 ]

Classes

class  EncodingMismatchException
class  MetaProperty

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index