Skip to content

Commit

Permalink
0006080: Improved name and documentation for DBExport's --symmetric o…
Browse files Browse the repository at this point in the history
…ption
  • Loading branch information
evan-miller-jumpmind committed Nov 1, 2023
1 parent b4c4fe5 commit ca8a5e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions symmetric-assemble/src/asciidoc/appendix/dbexport.ad
Expand Up @@ -48,6 +48,7 @@ They are as follows:
- *--schema <arg>* : Look for tables in schema.
- *--sql <arg>* : Run custom SQL to select data.
- *--use-jdbc-timestamp-format <arg>* : When true db export uses {ts 'yyyy-MM-dd h:mm:ss.SSS'} format for exported dates and times. Defaults to true.
- *--use-sym-db* : Use the database that contains SymmetricDS's tables. This only applies for nodes that are load only, extract only, or log based.
- *--use-variable-dates* : Substitute dates as ${curdate+-millis}.
- *-v, --verbose* : Use verbose format for console output.
- *--where <arg>* : Specify the SQL for the "where" clause.
Expand Down
Expand Up @@ -51,7 +51,7 @@ public class DbExportCommand extends AbstractCommandLauncher {
private static final String OPTION_DIR = "dir";
private static final String OPTION_WHERE = "where";
private static final String OPTION_EXCLUDE_COLUMNS = "exclude-columns";
private static final String OPTION_SYMMETRIC_PLATFORM = "symmetric";
private static final String OPTION_USE_SYM_DB = "use-sym-db";

public DbExportCommand() {
super("dbexport", "[tablename...]", "DbExport.Option.");
Expand Down Expand Up @@ -98,12 +98,12 @@ protected void buildOptions(Options options) {
addOption(options, null, OPTION_WHERE, true);
addOption(options, "i", OPTION_COMMENTS, false);
addOption(options, null, OPTION_EXCLUDE_COLUMNS, true);
addOption(options, null, OPTION_SYMMETRIC_PLATFORM, false);
addOption(options, null, OPTION_USE_SYM_DB, false);
}

@Override
protected boolean executeWithOptions(CommandLine line) throws Exception {
DbExport dbExport = new DbExport(getDatabasePlatform(false, line.hasOption(OPTION_SYMMETRIC_PLATFORM)));
DbExport dbExport = new DbExport(getDatabasePlatform(false, line.hasOption(OPTION_USE_SYM_DB)));
if (line.hasOption(OPTION_DIR)) {
String dir = line.getOptionValue(OPTION_DIR);
if (new File(dir).exists()) {
Expand Down
Expand Up @@ -169,6 +169,7 @@ DbExport.Option.sql=Run custom SQL to select data.
DbExport.Option.where=Specify the SQL for the "where" clause
DbExport.Option.dir=Indicate a directory to use for the export of files. If the dir is specified, then a file per table will be written to the directory.
DbExport.Option.exclude-columns=A comma separated list of columns to exclude from the exported tables.
DbExport.Option.use-sym-db=Use the database that contains SymmetricDS's tables. This only applies for nodes that are load only, extract only, or log based.

DbImport.Option.format=Input format: SQL, CSV, XML, or SYM_XML.
DbImport.Option.catalog=Look for tables in catalog.
Expand Down

0 comments on commit ca8a5e8

Please sign in to comment.