java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java
branchv_0
changeset 104 245f1b88a3e6
parent 101 97b0d9069133
child 106 e9c3583580c8
equal deleted inserted replaced
103:5410b6afc839 104:245f1b88a3e6
   139 	private void processQueryNow() throws ConfigurationException, SQLException, FormatterException {
   139 	private void processQueryNow() throws ConfigurationException, SQLException, FormatterException {
   140 		DatabaseDefinition dd = getConfiguration().getDatabase(options.getDatabaseName());
   140 		DatabaseDefinition dd = getConfiguration().getDatabase(options.getDatabaseName());
   141 		FormatterDefinition fd = configuration.getFormatter(options.getFormatterName());
   141 		FormatterDefinition fd = configuration.getFormatter(options.getFormatterName());
   142 		try (DatabaseConnection c = dd.connect()) {
   142 		try (DatabaseConnection c = dd.connect()) {
   143 			log.log(Level.FINE, "Database connected");
   143 			log.log(Level.FINE, "Database connected");
   144 			try (Formatter f = fd.getInstance(new FormatterContext(options.getOutputStream()))) {
   144 			try (Formatter f = fd.getInstance(new FormatterContext(options.getOutputStream(), options.getFormatterProperties()))) {
   145 				c.executeQuery(options.getSQLCommand(), f);
   145 				c.executeQuery(options.getSQLCommand(), f);
   146 			}
   146 			}
   147 		}
   147 		}
   148 	}
   148 	}
   149 
   149