|
|
|
@ -147,7 +147,7 @@ public class Main {
|
|
|
|
|
} else {
|
|
|
|
|
String query = commandBuffer.toString().trim();
|
|
|
|
|
if (query.toLowerCase().startsWith("select")) {
|
|
|
|
|
System.out.println(mapper.writeValueAsString(SqlExecutor.executeQuery(conn, query)));
|
|
|
|
|
System.out.println(mapper.writeValueAsString(SqlExecutor.executeQuery(conn, query.replaceAll(";$", "").trim())));
|
|
|
|
|
} else {
|
|
|
|
|
System.out.println(mapper.writeValueAsString(SqlExecutor.execute(conn, query)));
|
|
|
|
|
}
|
|
|
|
|