java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java
branchv_0
changeset 101 97b0d9069133
parent 96 7ae30649b30b
child 104 245f1b88a3e6
equal deleted inserted replaced
100:de65409a9f26 101:97b0d9069133
   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 			Formatter f = fd.getInstance(new FormatterContext(options.getOutputStream()));
   144 			try (Formatter f = fd.getInstance(new FormatterContext(options.getOutputStream()))) {
   145 			c.executeQuery(options.getSQLCommand(), f);
   145 				c.executeQuery(options.getSQLCommand(), f);
       
   146 			}
   146 		}
   147 		}
   147 	}
   148 	}
   148 
   149 
   149 	private void processPrepareBatch() {
   150 	private void processPrepareBatch() {
   150 	}
   151 	}