[jOOQ/jOOQ#7106] More transaction statement support (WIP)
This includes: - Teradata implementation
This commit is contained in:
parent
2bd55c87ca
commit
0ddbc74798
@ -52,6 +52,7 @@ import static org.jooq.SQLDialect.HSQLDB;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.conf.ParamType.INLINED;
|
||||
import static org.jooq.conf.SettingsTools.executePreparedStatements;
|
||||
import static org.jooq.conf.SettingsTools.getParamType;
|
||||
|
||||
@ -82,6 +82,17 @@ implements
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
ctx.visit(K_COMMIT);
|
||||
switch (ctx.family()) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
ctx.visit(K_COMMIT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1105,6 +1105,8 @@ final class DefaultParseContext extends AbstractScope implements ParseContext {
|
||||
case 'B':
|
||||
if (!parseResultQuery && peekKeyword("BEGIN WORK", "BEGIN TRANSACTION", "BEGIN TRAN"))
|
||||
return result = parseStartTransaction();
|
||||
else if (!parseResultQuery && parseKeywordIf("BT"))
|
||||
return dsl.startTransaction();
|
||||
else if (!parseResultQuery && peekKeyword("BEGIN")) {
|
||||
languageContext = previous;
|
||||
return result = parseBlock(false);
|
||||
@ -1155,6 +1157,8 @@ final class DefaultParseContext extends AbstractScope implements ParseContext {
|
||||
|
||||
|
||||
;
|
||||
else if (!parseResultQuery && parseKeywordIf("ET", "END TRANSACTION"))
|
||||
return dsl.commit();
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@ -119,6 +119,7 @@ implements
|
||||
|
||||
|
||||
|
||||
|
||||
case H2:
|
||||
case SQLITE: {
|
||||
ctx.visit(K_BEGIN).sql(' ').visit(K_TRANSACTION);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user