aldettinger commented on code in PR #4751:
URL: https://github.com/apache/camel-quarkus/pull/4751#discussion_r1159878237


##########
integration-tests/jdbc/src/main/java/org/apache/camel/quarkus/component/jdbc/CamelResource.java:
##########
@@ -183,4 +183,47 @@ public String moveBetweenDatasources() throws Exception {
         return template.requestBody("direct://move-between-datasources", null, 
String.class);
     }
 
+    private void runScripts(String fileName) throws SQLException, IOException {
+        try (Connection conn = dataSource.getConnection()) {
+            try (Statement statement = conn.createStatement()) {
+                try (InputStream is = 
Thread.currentThread().getContextClassLoader()
+                        .getResourceAsStream("sql/" + fileName);
+                        InputStreamReader isr = new InputStreamReader(is);
+                        BufferedReader reader = new BufferedReader(isr)) {
+
+                    reader.lines().filter(s -> s != null && !"".equals(s) && 
!s.startsWith("--")).forEach(s -> {
+                        try {
+                            statement.execute(s);

Review Comment:
   Ok, it's executing each line as a separate statement.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to