org.mariadb.r2dbc.MariadbTransactionDefinition Maven / Gradle / Ivy
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2020-2024 MariaDB Corporation Ab
package org.mariadb.r2dbc;
import io.r2dbc.spi.IsolationLevel;
import io.r2dbc.spi.Option;
import io.r2dbc.spi.TransactionDefinition;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.mariadb.r2dbc.util.Assert;
public final class MariadbTransactionDefinition implements TransactionDefinition {
public static final MariadbTransactionDefinition EMPTY =
new MariadbTransactionDefinition(Collections.emptyMap());
public static final Option WITH_CONSISTENT_SNAPSHOT =
Option.valueOf("WITH CONSISTENT SNAPSHOT");
public static MariadbTransactionDefinition WITH_CONSISTENT_SNAPSHOT_READ_WRITE =
EMPTY.consistent().readWrite();
public static MariadbTransactionDefinition WITH_CONSISTENT_SNAPSHOT_READ_ONLY =
EMPTY.consistent().readOnly();
public static MariadbTransactionDefinition READ_WRITE = EMPTY.readWrite();
public static MariadbTransactionDefinition READ_ONLY = EMPTY.readOnly();
private final Map