Send feedback
Interface Connection (2.18.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
public interface Connection extends AutoCloseable
Methods
abortBatch()
public abstract void abortBatch ()
addTransactionRetryListener(TransactionRetryListener arg0)
public abstract void addTransactionRetryListener ( TransactionRetryListener arg0 )
analyzeQuery(Statement arg0, ReadContext.QueryAnalyzeMode arg1)
public abstract ResultSet analyzeQuery ( Statement arg0 , ReadContext . QueryAnalyzeMode arg1 )
analyzeUpdate(Statement arg0, ReadContext.QueryAnalyzeMode arg1) (deprecated)
public default ResultSetStats analyzeUpdate ( Statement arg0 , ReadContext . QueryAnalyzeMode arg1 )
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 )
beginTransaction()
public abstract void beginTransaction ()
beginTransactionAsync()
public abstract ApiFuture<Void> beginTransactionAsync ()
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 )
cancel()
public abstract void cancel ()
clearStatementTimeout()
public abstract void clearStatementTimeout ()
close()
public abstract void close ()
closeAsync()
public abstract ApiFuture<Void> closeAsync ()
commit()
public abstract void commit ()
commitAsync()
public abstract ApiFuture<Void> commitAsync ()
execute(Statement arg0)
public abstract StatementResult execute ( Statement arg0 )
execute(Statement arg0, Set<StatementResult.ResultType> arg1)
public default StatementResult execute ( Statement arg0 , Set<StatementResult . ResultType > arg1 )
executeAsync(Statement arg0)
public abstract AsyncStatementResult executeAsync ( Statement arg0 )
executeBatchUpdate(Iterable<Statement> arg0)
public abstract long [] executeBatchUpdate ( Iterable<Statement> arg0 )
Returns
Type
Description
long []
executeBatchUpdateAsync(Iterable<Statement> arg0)
public abstract ApiFuture<long [] > executeBatchUpdateAsync ( Iterable<Statement> arg0 )
executeQuery(Statement arg0, Options.QueryOption[] arg1)
public abstract ResultSet executeQuery ( Statement arg0 , Options . QueryOption [] arg1 )
executeQueryAsync(Statement arg0, Options.QueryOption[] arg1)
public abstract AsyncResultSet executeQueryAsync ( Statement arg0 , Options . QueryOption [] arg1 )
executeUpdate(Statement arg0)
public abstract long executeUpdate ( Statement arg0 )
Returns
Type
Description
long
executeUpdateAsync(Statement arg0)
public abstract ApiFuture<Long> executeUpdateAsync ( Statement arg0 )
getAutocommitDmlMode()
public abstract AutocommitDmlMode getAutocommitDmlMode ()
getCommitResponse()
public abstract CommitResponse getCommitResponse ()
getCommitTimestamp()
public abstract Timestamp getCommitTimestamp ()
Returns
Type
Description
com.google.cloud.Timestamp
getDatabaseClient()
public default DatabaseClient getDatabaseClient ()
getDdlInTransactionMode()
public abstract DdlInTransactionMode getDdlInTransactionMode ()
getDialect()
public default Dialect getDialect ()
getDirectedRead()
public default DirectedReadOptions getDirectedRead ()
Returns
Type
Description
com.google.spanner.v1.DirectedReadOptions
getMaxCommitDelay()
public default Duration getMaxCommitDelay ()
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 ()
getReadOnlyStaleness()
public abstract TimestampBound getReadOnlyStaleness ()
getReadTimestamp()
public abstract Timestamp getReadTimestamp ()
Returns
Type
Description
com.google.cloud.Timestamp
getSavepointSupport()
public abstract SavepointSupport getSavepointSupport ()
getSpanner()
public default Spanner getSpanner ()
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 ()
getTransactionRetryListeners()
public abstract Iterator<TransactionRetryListener> getTransactionRetryListeners ()
getTransactionTag()
public default String getTransactionTag ()
Returns
Type
Description
String
hasStatementTimeout()
public abstract boolean hasStatementTimeout ()
isAutoPartitionMode()
public abstract boolean isAutoPartitionMode ()
isAutocommit()
public abstract boolean isAutocommit ()
isClosed()
public abstract boolean isClosed ()
isDataBoostEnabled()
public abstract boolean isDataBoostEnabled ()
isDdlBatchActive()
public abstract boolean isDdlBatchActive ()
isDelayTransactionStartUntilFirstWrite()
public default boolean isDelayTransactionStartUntilFirstWrite ()
isDmlBatchActive()
public abstract boolean isDmlBatchActive ()
isInTransaction()
public abstract boolean isInTransaction ()
isReadOnly()
public abstract boolean isReadOnly ()
isRetryAbortsInternally()
public abstract boolean isRetryAbortsInternally ()
isReturnCommitStats()
public abstract boolean isReturnCommitStats ()
isTransactionStarted()
public abstract boolean isTransactionStarted ()
partitionQuery(Statement arg0, PartitionOptions arg1, Options.QueryOption[] arg2)
public abstract ResultSet partitionQuery ( Statement arg0 , PartitionOptions arg1 , Options . QueryOption [] arg2 )
releaseSavepoint(String arg0)
public abstract void releaseSavepoint ( String arg0 )
Parameter
Name
Description
arg0
String
removeTransactionRetryListener(TransactionRetryListener arg0)
public abstract boolean removeTransactionRetryListener ( TransactionRetryListener arg0 )
rollback()
public abstract void rollback ()
rollbackAsync()
public abstract ApiFuture<Void> rollbackAsync ()
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 ()
runPartition(String arg0)
public abstract ResultSet runPartition ( String arg0 )
Parameter
Name
Description
arg0
String
runPartitionedQuery(Statement arg0, PartitionOptions arg1, Options.QueryOption[] arg2)
public abstract PartitionedQueryResultSet runPartitionedQuery ( Statement arg0 , PartitionOptions arg1 , Options . QueryOption [] arg2 )
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 )
setDataBoostEnabled(boolean arg0)
public abstract void setDataBoostEnabled ( boolean arg0 )
Parameter
Name
Description
arg0
boolean
setDdlInTransactionMode(DdlInTransactionMode arg0)
public abstract void setDdlInTransactionMode ( DdlInTransactionMode arg0 )
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 )
setReadOnly(boolean arg0)
public abstract void setReadOnly ( boolean arg0 )
Parameter
Name
Description
arg0
boolean
setReadOnlyStaleness(TimestampBound arg0)
public abstract void setReadOnlyStaleness ( TimestampBound arg0 )
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 )
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 )
setTransactionMode(TransactionMode arg0)
public abstract void setTransactionMode ( TransactionMode arg0 )
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 )
writeAsync(Mutation arg0)
public abstract ApiFuture<Void> writeAsync ( Mutation arg0 )
Parameter
Name
Description
arg0
Mutation
writeAsync(Iterable<Mutation> arg0)
public abstract ApiFuture<Void> writeAsync ( Iterable<Mutation> arg0 )
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-26 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-26 UTC."],[],[]]