Added possiblity to compile packages
This commit is contained in:
		@@ -144,7 +144,12 @@ public class Main {
 | 
				
			|||||||
				if (!"--- END ---".equals(line)) {
 | 
									if (!"--- END ---".equals(line)) {
 | 
				
			||||||
					commandBuffer.append(line);
 | 
										commandBuffer.append(line);
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					System.out.println(mapper.writeValueAsString(SqlExecutor.executeQuery(conn, commandBuffer.toString())));
 | 
										String query = commandBuffer.toString().trim();
 | 
				
			||||||
 | 
										if (query.matches("/^select/i")) {
 | 
				
			||||||
 | 
											System.out.println(mapper.writeValueAsString(SqlExecutor.executeQuery(conn, commandBuffer.toString())));
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											System.out.println(mapper.writeValueAsString(SqlExecutor.execute(conn, commandBuffer.toString())));
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
					commandBuffer.setLength(0);
 | 
										commandBuffer.setLength(0);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user