com.scalar.db.sql.SqlSessionStrategy Maven / Gradle / Ivy
package com.scalar.db.sql;
import com.scalar.db.sql.metadata.Metadata;
import com.scalar.db.sql.statement.Statement;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
interface SqlSessionStrategy {
Optional getTransactionId();
String begin();
String start();
void join(String transactionId);
void suspend();
void resume(String transactionId);
ResultSet execute(
String sql, @Nullable List positionalValues, @Nullable String defaultNamespaceName);
ResultSet execute(
String sql, @Nullable Map namedValues, @Nullable String defaultNamespaceName);
ResultSet execute(
Statement statement,
@Nullable List positionalValues,
@Nullable String defaultNamespaceName);
ResultSet execute(
Statement statement,
@Nullable Map namedValues,
@Nullable String defaultNamespaceName);
void prepare();
void validate();
void commit();
void rollback();
void abort();
boolean isTransactionInProgress();
Metadata getMetadata();
}