equal
deleted
inserted
replaced
107 } else { |
107 } else { |
108 FormatterDefinition fd = configuration.getFormatter(options.getFormatterName()); |
108 FormatterDefinition fd = configuration.getFormatter(options.getFormatterName()); |
109 if (fd == null) { |
109 if (fd == null) { |
110 throw new ConfigurationException("Formatter is not configured: " + options.getFormatterName()); |
110 throw new ConfigurationException("Formatter is not configured: " + options.getFormatterName()); |
111 } else { |
111 } else { |
112 DatabaseConnection c = dd.connect(); |
112 try (DatabaseConnection c = dd.connect()) { |
113 Formatter f = fd.getInstance(new FormatterContext(options.getOutputStream())); |
113 Formatter f = fd.getInstance(new FormatterContext(options.getOutputStream())); |
114 c.executeQuery(options.getSQLCommand(), f); |
114 c.executeQuery(options.getSQLCommand(), f); |
|
115 } |
115 } |
116 } |
116 } |
117 } |
117 } |
118 } |
118 |
119 |
119 private void processPrepareBatch() { |
120 private void processPrepareBatch() { |