Skip to content

Commit 89f1dd1

Browse files
committed
Added DELIMITER support
1 parent 636ca74 commit 89f1dd1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/apache/ibatis/jdbc/ScriptRunner.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ private void checkForMissingLineTerminator(StringBuilder command) {
186186

187187
private StringBuilder handleLine(StringBuilder command, String line) throws SQLException, UnsupportedEncodingException {
188188
String trimmedLine = line.trim();
189+
if (trimmedLine.toUpperCase().startsWith("DELIMITER")) {
190+
delimiter = trimmedLine.substring(10).trim();
191+
return command;
192+
}
189193
if (lineIsComment(trimmedLine)) {
190194
println(trimmedLine);
191195
} else if (commandReadyToExecute(trimmedLine)) {

0 commit comments

Comments
 (0)