Skip to content

Commit

Permalink
Fixed #2592 Cockroach cannot support mixing DDL/DML in transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
juliahayward committed Dec 9, 2019
1 parent e26b7fe commit b74ab8d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.flywaydb.core.internal.parser.*;

import java.io.IOException;
import java.util.List;

public class CockroachDBParser extends Parser {
public CockroachDBParser(Configuration configuration, ParsingContext parsingContext) {
Expand All @@ -38,4 +39,9 @@ protected Token handleAlternativeStringLiteral(PeekingReader reader, ParserConte
reader.swallow(dollarQuote.length());
return new Token(TokenType.STRING, pos, line, col, null, null, context.getParensDepth());
}

@Override
protected Boolean detectCanExecuteInTransaction(String simplifiedStatement, List<Token> keywords) {
return false;
}
}

0 comments on commit b74ab8d

Please sign in to comment.