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

String henplus::commands::DumpCommand::getLongDescription ( String  cmd  )  [inline]

returns a longer string describing this action. This should return a String describing details of the given command. This String should start with a TAB-character in each new line (the first line is a new line). The last line should not end with newline.

Parameters:
cmd The command the long description is asked for. This is one of the possible commands returned by getCommandList().

Reimplemented from henplus::AbstractCommand.

Definition at line 1217 of file DumpCommand.java.

                                                 {
      String dsc = null;
      if ("dump-out".equals(cmd)) {
          dsc= "\tDump out the contents of the table(s) given to the file\n"
            +"\twith the given name. If the filename ends with '.gz', the\n"
            +"\tcontent is gzip'ed automatically .. that saves space.\n\n"
            +"\tThe dump-format allows to read in the data back into\n"
            +"\tthe database ('dump-in' command). And unlike pure SQL-insert\n"
            +"\tstatements, this works even across databases.\n"
            +"\tSo you can make a dump of your MySQL database and read it\n"
            +"\tback into Oracle, for instance. To achive this database\n"
            +"\tindependence, the data is stored in a canonical form\n"
            +"\t(e.g. the Time/Date). The file itself is human readable\n"
            +"\tand uses less space than simple SQL-inserts:\n"
            +"\t----------------\n"
            +"\t  (tabledump 'student'\n"
            +"\t    (dump-version 1 1)\n"
            +"\t    (henplus-version 0.3.3)\n"
            +"\t    (database-info 'MySQL - 3.23.47')\n"
            +"\t    (meta ('name',   'sex',    'student_id')\n"
            +"\t          ('STRING', 'STRING', 'INTEGER'   ))\n"
            +"\t    (data ('Megan','F',1)\n"
            +"\t          ('Joseph','M',2)\n"
            +"\t          ('Kyle','M',3)\n"
            +"\t          ('Mac Donald\\'s','M',4))\n"
            +"\t    (rows 4))\n"
            +"\t----------------\n\n"
            +"\tTODOs\n"
            +"\tThis format contains only the data, no\n"
            +"\tcanonical 'create table' statement - so the table must\n"
            +"\talready exist at import time. Both these features will\n"
            +"\tbe in later versions of HenPlus.";
      }

      else if ("dump-conditional".equals(cmd)) {
          dsc= "\tLike dump-out, but dump only the rows of a single table\n"
            +"\tthat match the where clause.";
      }
      
      else if ("dump-in".equals(cmd)) {
          dsc= "\tRead back in the data that has been dumped out with the\n"
            +"\t'dump-out' command. If the filename ends with '.gz',\n"
            +"\tthen the content is assumed to be gzipped and is\n"
            +"\tunpacked on the fly. The 'dump-in' command fills\n"
            +"\texisting tables, it does not create missing ones!\n\n"
                +"\tExisting content ist not deleted before, dump-in just\n"
                +"\tinserts all data found in the dump.\n\n"
            +"\tInternally, the import uses a prepared statement that is\n"
            +"\tfed with the typed data according to the meta data (see\n"
            +"\tdump-out for the file format). This evens out differences\n"
            +"\tbetween databases and of course enhances speed compared\n"
            +"\tto non-prepared statements.\n\n"
            +"\tThe import is done in the current transaction, unless\n"
            +"\tyou specify the commitpoints. The commitpoints specify\n"
            +"\tthe number of inserts, that are executed before an commit\n"
            +"\tis done. For a large amount of data this option is\n"
            +"\tnecessary, since otherwise your rollback-segments\n"
            +"\tmight get a problem ;-)";
      }

      else if ("verify-dump".equals(cmd)) {
          dsc= "\tLike dump-in, but a 'dry run'. Won't change anything\n"
            +"\tbut parses the whole file to determine whether it has\n"
            +"\tsyntax errors or is damaged. Any syntax errors are\n"
            +"\treported as it were a 'dump-in'. Problems that might\n"
            +"\toccur in a 'real' import in the database (that might\n"
            +"\tdetect, that the import would create duplicate keys for\n"
            +"\tinstance) can not be determined, of course.";
      }
      return dsc;
    }


Generated by  Doxygen 1.6.0   Back to index