Interface Connection (2.17.0)

public interface Connection extends AutoCloseable

Implements

AutoCloseable

Methods

abortBatch()

public abstract void abortBatch()

addTransactionRetryListener(TransactionRetryListener arg0)

public abstract void addTransactionRetryListener(TransactionRetryListener arg0)
Parameter
Name Description
arg0 TransactionRetryListener

analyzeQuery(Statement arg0, ReadContext.QueryAnalyzeMode arg1)

public abstract ResultSet analyzeQuery(Statement arg0, ReadContext.QueryAnalyzeMode arg1)
Parameters
Name Description
arg0 Statement
arg1 QueryAnalyzeMode
Returns
Type Description
ResultSet

analyzeUpdate(Statement arg0, ReadContext.QueryAnalyzeMode arg1) (deprecated)

public default ResultSetStats analyzeUpdate(Statement arg0, ReadContext.QueryAnalyzeMode arg1)
Parameters
Name Description
arg0 Statement
arg1 QueryAnalyzeMode
Returns
Type Description
com.google.spanner.v1.ResultSetStats

analyzeUpdateStatement(Statement arg0, ReadContext.QueryAnalyzeMode arg1, Options.UpdateOption[] arg2)

public default ResultSet analyzeUpdateStatement(Statement arg0, ReadContext.QueryAnalyzeMode arg1, Options.UpdateOption[] arg2)
Parameters
Name Description
arg0 Statement
arg1 QueryAnalyzeMode
arg2 UpdateOption[]
Returns
Type Description
ResultSet

beginTransaction()

public abstract void beginTransaction()

beginTransactionAsync()

public abstract ApiFuture<Void> beginTransactionAsync()
Returns
Type Description
ApiFuture<Void>

bufferedWrite(Mutation arg0)

public abstract void bufferedWrite(Mutation arg0)
Parameter
Name Description
arg0 Mutation

bufferedWrite(Iterable<Mutation> arg0)

public abstract void bufferedWrite(Iterable<Mutation> arg0)
Parameter
Name Description
arg0 Iterable<Mutation>

cancel()

public abstract void cancel()

clearStatementTimeout()

public abstract void clearStatementTimeout()

close()

public abstract void close()

closeAsync()

public abstract ApiFuture<Void> closeAsync()
Returns
Type Description
ApiFuture<Void>

commit()

public abstract void commit()

commitAsync()

public abstract ApiFuture<Void> commitAsync()
Returns
Type Description
ApiFuture<Void>

execute(Statement arg0)

public abstract StatementResult execute(Statement arg0)
Parameter
Name Description
arg0 Statement
Returns
Type Description
StatementResult

execute(Statement arg0, Set<StatementResult.ResultType> arg1)

public default StatementResult execute(Statement arg0, Set<StatementResult.ResultType> arg1)
Parameters
Name Description
arg0 Statement
arg1 Set<ResultType>
Returns
Type Description
StatementResult

executeAsync(Statement arg0)

public abstract AsyncStatementResult executeAsync(Statement arg0)
Parameter
Name Description
arg0 Statement
Returns
Type Description
AsyncStatementResult

executeBatchUpdate(Iterable<Statement> arg0)

public abstract long[] executeBatchUpdate(Iterable<Statement> arg0)
Parameter
Name Description
arg0 Iterable<Statement>
Returns
Type Description
long[]

executeBatchUpdateAsync(Iterable<Statement> arg0)

public abstract ApiFuture<long[]> executeBatchUpdateAsync(Iterable<Statement> arg0)
Parameter
Name Description
arg0 Iterable<Statement>
Returns
Type Description
ApiFuture<long[]>

executeQuery(Statement arg0, Options.QueryOption[] arg1)

public abstract ResultSet executeQuery(Statement arg0, Options.QueryOption[] arg1)
Parameters
Name Description
arg0 Statement
arg1 QueryOption[]
Returns
Type Description
ResultSet

executeQueryAsync(Statement arg0, Options.QueryOption[] arg1)

public abstract AsyncResultSet executeQueryAsync(Statement arg0, Options.QueryOption[] arg1)
Parameters
Name Description
arg0 Statement
arg1 QueryOption[]
Returns
Type Description
AsyncResultSet

executeUpdate(Statement arg0)

public abstract long executeUpdate(Statement arg0)
Parameter
Name Description
arg0 Statement
Returns
Type Description
long

executeUpdateAsync(Statement arg0)

public abstract ApiFuture<Long> executeUpdateAsync(Statement arg0)
Parameter
Name Description
arg0 Statement
Returns
Type Description
ApiFuture<Long>

getAutocommitDmlMode()

public abstract AutocommitDmlMode getAutocommitDmlMode()
Returns
Type Description
AutocommitDmlMode

getCommitResponse()

public abstract CommitResponse getCommitResponse()
Returns
Type Description
CommitResponse

getCommitTimestamp()

public abstract Timestamp getCommitTimestamp()
Returns
Type Description
com.google.cloud.Timestamp

getDatabaseClient()

public default DatabaseClient getDatabaseClient()
Returns
Type Description
DatabaseClient

getDialect()

public default Dialect getDialect()
Returns
Type Description
Dialect

getDirectedRead()

public default DirectedReadOptions getDirectedRead()
Returns
Type Description
com.google.spanner.v1.DirectedReadOptions

getMaxCommitDelay()

public default Duration getMaxCommitDelay()
Returns
Type Description
Duration

getMaxPartitionedParallelism()

public abstract int getMaxPartitionedParallelism()
Returns
Type Description
int

getMaxPartitions()

public abstract int getMaxPartitions()
Returns
Type Description
int

getOptimizerStatisticsPackage()

public default String getOptimizerStatisticsPackage()
Returns
Type Description
String

getOptimizerVersion()

public abstract String getOptimizerVersion()
Returns
Type Description
String

getRPCPriority()

public default Options.RpcPriority getRPCPriority()
Returns
Type Description
RpcPriority

getReadOnlyStaleness()

public abstract TimestampBound getReadOnlyStaleness()
Returns
Type Description
TimestampBound

getReadTimestamp()

public abstract Timestamp getReadTimestamp()
Returns
Type Description
com.google.cloud.Timestamp

getSavepointSupport()

public abstract SavepointSupport getSavepointSupport()
Returns
Type Description
SavepointSupport

getSpanner()

public default Spanner getSpanner()
Returns
Type Description
Spanner

getStatementTag()

public default String getStatementTag()
Returns
Type Description
String

getStatementTimeout(TimeUnit arg0)

public abstract long getStatementTimeout(TimeUnit arg0)
Parameter
Name Description
arg0 TimeUnit
Returns
Type Description
long

getTransactionMode()

public abstract TransactionMode getTransactionMode()
Returns
Type Description
TransactionMode

getTransactionRetryListeners()

public abstract Iterator<TransactionRetryListener> getTransactionRetryListeners()
Returns
Type Description
Iterator<TransactionRetryListener>

getTransactionTag()

public default String getTransactionTag()
Returns
Type Description
String

hasStatementTimeout()

public abstract boolean hasStatementTimeout()
Returns
Type Description
boolean

isAutoPartitionMode()

public abstract boolean isAutoPartitionMode()
Returns
Type Description
boolean

isAutocommit()

public abstract boolean isAutocommit()
Returns
Type Description
boolean

isClosed()

public abstract boolean isClosed()
Returns
Type Description
boolean

isDataBoostEnabled()

public abstract boolean isDataBoostEnabled()
Returns
Type Description
boolean

isDdlBatchActive()

public abstract boolean isDdlBatchActive()
Returns
Type Description
boolean

isDelayTransactionStartUntilFirstWrite()

public default boolean isDelayTransactionStartUntilFirstWrite()
Returns
Type Description
boolean

isDmlBatchActive()

public abstract boolean isDmlBatchActive()
Returns
Type Description
boolean

isInTransaction()

public abstract boolean isInTransaction()
Returns
Type Description
boolean

isReadOnly()

public abstract boolean isReadOnly()
Returns
Type Description
boolean

isRetryAbortsInternally()

public abstract boolean isRetryAbortsInternally()
Returns
Type Description
boolean

isReturnCommitStats()

public abstract boolean isReturnCommitStats()
Returns
Type Description
boolean

isTransactionStarted()

public abstract boolean isTransactionStarted()
Returns
Type Description
boolean

partitionQuery(Statement arg0, PartitionOptions arg1, Options.QueryOption[] arg2)

public abstract ResultSet partitionQuery(Statement arg0, PartitionOptions arg1, Options.QueryOption[] arg2)
Parameters
Name Description
arg0 Statement
arg1 PartitionOptions
arg2 QueryOption[]
Returns
Type Description
ResultSet

releaseSavepoint(String arg0)

public abstract void releaseSavepoint(String arg0)
Parameter
Name Description
arg0 String

removeTransactionRetryListener(TransactionRetryListener arg0)

public abstract boolean removeTransactionRetryListener(TransactionRetryListener arg0)
Parameter
Name Description
arg0 TransactionRetryListener
Returns
Type Description
boolean

rollback()

public abstract void rollback()

rollbackAsync()

public abstract ApiFuture<Void> rollbackAsync()
Returns
Type Description
ApiFuture<Void>

rollbackToSavepoint(String arg0)

public abstract void rollbackToSavepoint(String arg0)
Parameter
Name Description
arg0 String

runBatch()

public abstract long[] runBatch()
Returns
Type Description
long[]

runBatchAsync()

public abstract ApiFuture<long[]> runBatchAsync()
Returns
Type Description
ApiFuture<long[]>

runPartition(String arg0)

public abstract ResultSet runPartition(String arg0)
Parameter
Name Description
arg0 String
Returns
Type Description
ResultSet

runPartitionedQuery(Statement arg0, PartitionOptions arg1, Options.QueryOption[] arg2)

public abstract PartitionedQueryResultSet runPartitionedQuery(Statement arg0, PartitionOptions arg1, Options.QueryOption[] arg2)
Parameters
Name Description
arg0 Statement
arg1 PartitionOptions
arg2 QueryOption[]
Returns
Type Description
PartitionedQueryResultSet

savepoint(String arg0)

public abstract void savepoint(String arg0)
Parameter
Name Description
arg0 String

setAutoPartitionMode(boolean arg0)

public abstract void setAutoPartitionMode(boolean arg0)
Parameter
Name Description
arg0 boolean

setAutocommit(boolean arg0)

public abstract void setAutocommit(boolean arg0)
Parameter
Name Description
arg0 boolean

setAutocommitDmlMode(AutocommitDmlMode arg0)

public abstract void setAutocommitDmlMode(AutocommitDmlMode arg0)
Parameter
Name Description
arg0 AutocommitDmlMode

setDataBoostEnabled(boolean arg0)

public abstract void setDataBoostEnabled(boolean arg0)
Parameter
Name Description
arg0 boolean

setDelayTransactionStartUntilFirstWrite(boolean arg0)

public default void setDelayTransactionStartUntilFirstWrite(boolean arg0)
Parameter
Name Description
arg0 boolean

setDirectedRead(DirectedReadOptions arg0)

public default void setDirectedRead(DirectedReadOptions arg0)
Parameter
Name Description
arg0 com.google.spanner.v1.DirectedReadOptions

setMaxCommitDelay(Duration arg0)

public default void setMaxCommitDelay(Duration arg0)
Parameter
Name Description
arg0 Duration

setMaxPartitionedParallelism(int arg0)

public abstract void setMaxPartitionedParallelism(int arg0)
Parameter
Name Description
arg0 int

setMaxPartitions(int arg0)

public abstract void setMaxPartitions(int arg0)
Parameter
Name Description
arg0 int

setOptimizerStatisticsPackage(String arg0)

public default void setOptimizerStatisticsPackage(String arg0)
Parameter
Name Description
arg0 String

setOptimizerVersion(String arg0)

public abstract void setOptimizerVersion(String arg0)
Parameter
Name Description
arg0 String

setRPCPriority(Options.RpcPriority arg0)

public default void setRPCPriority(Options.RpcPriority arg0)
Parameter
Name Description
arg0 RpcPriority

setReadOnly(boolean arg0)

public abstract void setReadOnly(boolean arg0)
Parameter
Name Description
arg0 boolean

setReadOnlyStaleness(TimestampBound arg0)

public abstract void setReadOnlyStaleness(TimestampBound arg0)
Parameter
Name Description
arg0 TimestampBound

setRetryAbortsInternally(boolean arg0)

public abstract void setRetryAbortsInternally(boolean arg0)
Parameter
Name Description
arg0 boolean

setReturnCommitStats(boolean arg0)

public abstract void setReturnCommitStats(boolean arg0)
Parameter
Name Description
arg0 boolean

setSavepointSupport(SavepointSupport arg0)

public abstract void setSavepointSupport(SavepointSupport arg0)
Parameter
Name Description
arg0 SavepointSupport

setStatementTag(String arg0)

public default void setStatementTag(String arg0)
Parameter
Name Description
arg0 String

setStatementTimeout(long arg0, TimeUnit arg1)

public abstract void setStatementTimeout(long arg0, TimeUnit arg1)
Parameters
Name Description
arg0 long
arg1 TimeUnit

setTransactionMode(TransactionMode arg0)

public abstract void setTransactionMode(TransactionMode arg0)
Parameter
Name Description
arg0 TransactionMode

setTransactionTag(String arg0)

public default void setTransactionTag(String arg0)
Parameter
Name Description
arg0 String

startBatchDdl()

public abstract void startBatchDdl()

startBatchDml()

public abstract void startBatchDml()

write(Mutation arg0)

public abstract void write(Mutation arg0)
Parameter
Name Description
arg0 Mutation

write(Iterable<Mutation> arg0)

public abstract void write(Iterable<Mutation> arg0)
Parameter
Name Description
arg0 Iterable<Mutation>

writeAsync(Mutation arg0)

public abstract ApiFuture<Void> writeAsync(Mutation arg0)
Parameter
Name Description
arg0 Mutation
Returns
Type Description
ApiFuture<Void>

writeAsync(Iterable<Mutation> arg0)

public abstract ApiFuture<Void> writeAsync(Iterable<Mutation> arg0)
Parameter
Name Description
arg0 Iterable<Mutation>
Returns
Type Description
ApiFuture<Void>