HHH-17302 - Use nocache for MariaDB sequences

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
Jan Schatteman 2023-10-10 17:04:56 +02:00 committed by Christian Beikov
parent e424eea9e9
commit 519ae4282f
1 changed files with 15 additions and 0 deletions

View File

@ -17,6 +17,21 @@ public final class MariaDBSequenceSupport extends ANSISequenceSupport {
public static final SequenceSupport INSTANCE = new MariaDBSequenceSupport();
@Override
public String getCreateSequenceString(String sequenceName) throws MappingException {
return "create sequence " + sequenceName + " nocache";
}
@Override
public String getCreateSequenceString(String sequenceName, int initialValue, int incrementSize)
throws MappingException {
return "create sequence " + sequenceName
+ startingValue( initialValue, incrementSize )
+ " start with " + initialValue
+ " increment by " + incrementSize
+ " nocache";
}
@Override
public String getSelectSequencePreviousValString(String sequenceName) throws MappingException {
return "previous value for " + sequenceName;