Interface Connection (0.6.0)

public interface Connection extends AutoCloseable

Implements

AutoCloseable

Methods

abortBatch()

public abstract void abortBatch()

addTransactionRetryListener(TransactionRetryListener arg0)

public abstract void addTransactionRetryListener(TransactionRetryListener arg0)
Parameter
NameDescription
arg0TransactionRetryListener

analyzeQuery(Statement arg0, ReadContext.QueryAnalyzeMode arg1)

public abstract ResultSet analyzeQuery(Statement arg0, ReadContext.QueryAnalyzeMode arg1)
Parameters
NameDescription
arg0com.google.cloud.spanner.Statement
arg1com.google.cloud.spanner.ReadContext.QueryAnalyzeMode
Returns
TypeDescription
com.google.cloud.spanner.ResultSet

analyzeUpdate(Statement arg0, ReadContext.QueryAnalyzeMode arg1)

public default ResultSetStats analyzeUpdate(Statement arg0, ReadContext.QueryAnalyzeMode arg1)
Parameters
NameDescription
arg0com.google.cloud.spanner.Statement
arg1com.google.cloud.spanner.ReadContext.QueryAnalyzeMode
Returns
TypeDescription
com.google.spanner.v1.ResultSetStats

beginTransaction()

public abstract void beginTransaction()

beginTransactionAsync()

public abstract ApiFuture<Void> beginTransactionAsync()
Returns
TypeDescription
ApiFuture<Void>

bufferedWrite(Mutation arg0)

public abstract void bufferedWrite(Mutation arg0)
Parameter
NameDescription
arg0com.google.cloud.spanner.Mutation

bufferedWrite(Iterable<Mutation> arg0)

public abstract void bufferedWrite(Iterable<Mutation> arg0)
Parameter
NameDescription
arg0Iterable<com.google.cloud.spanner.Mutation>

cancel()

public abstract void cancel()

clearStatementTimeout()

public abstract void clearStatementTimeout()

close()

public abstract void close()

closeAsync()

public abstract ApiFuture<Void> closeAsync()
Returns
TypeDescription
ApiFuture<Void>

commit()

public abstract void commit()

commitAsync()

public abstract ApiFuture<Void> commitAsync()
Returns
TypeDescription
ApiFuture<Void>

execute(Statement arg0)

public abstract StatementResult execute(Statement arg0)
Parameter
NameDescription
arg0com.google.cloud.spanner.Statement
Returns
TypeDescription
StatementResult

executeAsync(Statement arg0)

public abstract AsyncStatementResult executeAsync(Statement arg0)
Parameter
NameDescription
arg0com.google.cloud.spanner.Statement
Returns
TypeDescription
AsyncStatementResult

executeBatchUpdate(Iterable<Statement> arg0)

public abstract long[] executeBatchUpdate(Iterable<Statement> arg0)
Parameter
NameDescription
arg0Iterable<com.google.cloud.spanner.Statement>
Returns
TypeDescription
long[]

executeBatchUpdateAsync(Iterable<Statement> arg0)

public abstract ApiFuture<long[]> executeBatchUpdateAsync(Iterable<Statement> arg0)
Parameter
NameDescription
arg0Iterable<com.google.cloud.spanner.Statement>
Returns
TypeDescription
ApiFuture<long[]>

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

public abstract ResultSet executeQuery(Statement arg0, Options.QueryOption[] arg1)
Parameters
NameDescription
arg0com.google.cloud.spanner.Statement
arg1com.google.cloud.spanner.Options.QueryOption[]
Returns
TypeDescription
com.google.cloud.spanner.ResultSet

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

public abstract AsyncResultSet executeQueryAsync(Statement arg0, Options.QueryOption[] arg1)
Parameters
NameDescription
arg0com.google.cloud.spanner.Statement
arg1com.google.cloud.spanner.Options.QueryOption[]
Returns
TypeDescription
com.google.cloud.spanner.AsyncResultSet

executeUpdate(Statement arg0)

public abstract long executeUpdate(Statement arg0)
Parameter
NameDescription
arg0com.google.cloud.spanner.Statement
Returns
TypeDescription
long

executeUpdateAsync(Statement arg0)

public abstract ApiFuture<Long> executeUpdateAsync(Statement arg0)
Parameter
NameDescription
arg0com.google.cloud.spanner.Statement
Returns
TypeDescription
ApiFuture<Long>

getAutocommitDmlMode()

public abstract AutocommitDmlMode getAutocommitDmlMode()
Returns
TypeDescription
AutocommitDmlMode

getCommitResponse()

public abstract CommitResponse getCommitResponse()
Returns
TypeDescription
com.google.cloud.spanner.CommitResponse

getCommitTimestamp()

public abstract Timestamp getCommitTimestamp()
Returns
TypeDescription
com.google.cloud.Timestamp

getDatabaseClient()

public default DatabaseClient getDatabaseClient()
Returns
TypeDescription
com.google.cloud.spanner.DatabaseClient

getDialect()

public default Dialect getDialect()
Returns
TypeDescription
com.google.cloud.spanner.Dialect

getOptimizerStatisticsPackage()

public default String getOptimizerStatisticsPackage()
Returns
TypeDescription
String

getOptimizerVersion()

public abstract String getOptimizerVersion()
Returns
TypeDescription
String

getRPCPriority()

public default Options.RpcPriority getRPCPriority()
Returns
TypeDescription
com.google.cloud.spanner.Options.RpcPriority

getReadOnlyStaleness()

public abstract TimestampBound getReadOnlyStaleness()
Returns
TypeDescription
com.google.cloud.spanner.TimestampBound

getReadTimestamp()

public abstract Timestamp getReadTimestamp()
Returns
TypeDescription
com.google.cloud.Timestamp

getStatementTag()

public default String getStatementTag()
Returns
TypeDescription
String

getStatementTimeout(TimeUnit arg0)

public abstract long getStatementTimeout(TimeUnit arg0)
Parameter
NameDescription
arg0TimeUnit
Returns
TypeDescription
long

getTransactionMode()

public abstract TransactionMode getTransactionMode()
Returns
TypeDescription
TransactionMode

getTransactionRetryListeners()

public abstract Iterator<TransactionRetryListener> getTransactionRetryListeners()
Returns
TypeDescription
Iterator<TransactionRetryListener>

getTransactionTag()

public default String getTransactionTag()
Returns
TypeDescription
String

hasStatementTimeout()

public abstract boolean hasStatementTimeout()
Returns
TypeDescription
boolean

isAutocommit()

public abstract boolean isAutocommit()
Returns
TypeDescription
boolean

isClosed()

public abstract boolean isClosed()
Returns
TypeDescription
boolean

isDdlBatchActive()

public abstract boolean isDdlBatchActive()
Returns
TypeDescription
boolean

isDmlBatchActive()

public abstract boolean isDmlBatchActive()
Returns
TypeDescription
boolean

isInTransaction()

public abstract boolean isInTransaction()
Returns
TypeDescription
boolean

isReadOnly()

public abstract boolean isReadOnly()
Returns
TypeDescription
boolean

isRetryAbortsInternally()

public abstract boolean isRetryAbortsInternally()
Returns
TypeDescription
boolean

isReturnCommitStats()

public abstract boolean isReturnCommitStats()
Returns
TypeDescription
boolean

isTransactionStarted()

public abstract boolean isTransactionStarted()
Returns
TypeDescription
boolean

removeTransactionRetryListener(TransactionRetryListener arg0)

public abstract boolean removeTransactionRetryListener(TransactionRetryListener arg0)
Parameter
NameDescription
arg0TransactionRetryListener
Returns
TypeDescription
boolean

rollback()

public abstract void rollback()

rollbackAsync()

public abstract ApiFuture<Void> rollbackAsync()
Returns
TypeDescription
ApiFuture<Void>

runBatch()

public abstract long[] runBatch()
Returns
TypeDescription
long[]

runBatchAsync()

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

setAutocommit(boolean arg0)

public abstract void setAutocommit(boolean arg0)
Parameter
NameDescription
arg0boolean

setAutocommitDmlMode(AutocommitDmlMode arg0)

public abstract void setAutocommitDmlMode(AutocommitDmlMode arg0)
Parameter
NameDescription
arg0AutocommitDmlMode

setOptimizerStatisticsPackage(String arg0)

public default void setOptimizerStatisticsPackage(String arg0)
Parameter
NameDescription
arg0String

setOptimizerVersion(String arg0)

public abstract void setOptimizerVersion(String arg0)
Parameter
NameDescription
arg0String

setRPCPriority(Options.RpcPriority arg0)

public default void setRPCPriority(Options.RpcPriority arg0)
Parameter
NameDescription
arg0com.google.cloud.spanner.Options.RpcPriority

setReadOnly(boolean arg0)

public abstract void setReadOnly(boolean arg0)
Parameter
NameDescription
arg0boolean

setReadOnlyStaleness(TimestampBound arg0)

public abstract void setReadOnlyStaleness(TimestampBound arg0)
Parameter
NameDescription
arg0com.google.cloud.spanner.TimestampBound

setRetryAbortsInternally(boolean arg0)

public abstract void setRetryAbortsInternally(boolean arg0)
Parameter
NameDescription
arg0boolean

setReturnCommitStats(boolean arg0)

public abstract void setReturnCommitStats(boolean arg0)
Parameter
NameDescription
arg0boolean

setStatementTag(String arg0)

public default void setStatementTag(String arg0)
Parameter
NameDescription
arg0String

setStatementTimeout(long arg0, TimeUnit arg1)

public abstract void setStatementTimeout(long arg0, TimeUnit arg1)
Parameters
NameDescription
arg0long
arg1TimeUnit

setTransactionMode(TransactionMode arg0)

public abstract void setTransactionMode(TransactionMode arg0)
Parameter
NameDescription
arg0TransactionMode

setTransactionTag(String arg0)

public default void setTransactionTag(String arg0)
Parameter
NameDescription
arg0String

startBatchDdl()

public abstract void startBatchDdl()

startBatchDml()

public abstract void startBatchDml()

write(Mutation arg0)

public abstract void write(Mutation arg0)
Parameter
NameDescription
arg0com.google.cloud.spanner.Mutation

write(Iterable<Mutation> arg0)

public abstract void write(Iterable<Mutation> arg0)
Parameter
NameDescription
arg0Iterable<com.google.cloud.spanner.Mutation>

writeAsync(Mutation arg0)

public abstract ApiFuture<Void> writeAsync(Mutation arg0)
Parameter
NameDescription
arg0com.google.cloud.spanner.Mutation
Returns
TypeDescription
ApiFuture<Void>

writeAsync(Iterable<Mutation> arg0)

public abstract ApiFuture<Void> writeAsync(Iterable<Mutation> arg0)
Parameter
NameDescription
arg0Iterable<com.google.cloud.spanner.Mutation>
Returns
TypeDescription
ApiFuture<Void>