public interface MySqlConnection
extends io.r2dbc.spi.Connection, io.r2dbc.spi.Lifecycle
Connection for connecting to a MySQL database.| Modifier and Type | Method and Description |
|---|---|
Mono<Void> |
beginTransaction() |
Mono<Void> |
beginTransaction(io.r2dbc.spi.TransactionDefinition definition) |
Mono<Void> |
close() |
Mono<Void> |
commitTransaction() |
MySqlBatch |
createBatch() |
Mono<Void> |
createSavepoint(String name) |
MySqlStatement |
createStatement(String sql) |
MySqlConnectionMetadata |
getMetadata() |
Mono<Void> |
postAllocate() |
Mono<Void> |
preRelease() |
Mono<Void> |
releaseSavepoint(String name) |
Mono<Void> |
rollbackTransaction() |
Mono<Void> |
rollbackTransactionToSavepoint(String name) |
Mono<Void> |
setAutoCommit(boolean autoCommit) |
Mono<Void> |
setLockWaitTimeout(Duration timeout) |
Mono<Void> |
setStatementTimeout(Duration timeout) |
Mono<Void> |
setTransactionIsolationLevel(io.r2dbc.spi.IsolationLevel isolationLevel) |
Mono<Boolean> |
validate(io.r2dbc.spi.ValidationDepth depth) |
Mono<Void> beginTransaction()
Note: MySQL server will disable the auto-commit mode automatically when a transaction is started.
beginTransaction in interface io.r2dbc.spi.ConnectionMono that indicates that the transaction has begunMono<Void> beginTransaction(io.r2dbc.spi.TransactionDefinition definition)
Note: MySQL server will disable the auto-commit mode automatically when a transaction is started.
beginTransaction in interface io.r2dbc.spi.Connectiondefinition - the transaction definition, must not be nullMono that indicates that the transaction has begunIllegalArgumentException - if definition is nullMono<Void> close()
close in interface io.r2dbc.spi.Closeableclose in interface io.r2dbc.spi.ConnectionMono that indicates that the connection has been closedMono<Void> commitTransaction()
commitTransaction in interface io.r2dbc.spi.ConnectionMono that indicates that the transaction has been committedMySqlBatch createBatch()
createBatch in interface io.r2dbc.spi.ConnectionMySqlBatch that can be used to execute a batch of statementsMono<Void> createSavepoint(String name)
createSavepoint in interface io.r2dbc.spi.Connectionname - the savepoint name, must not be nullMono that indicates that the savepoint has been createdIllegalArgumentException - if name is nullMySqlStatement createStatement(String sql)
createStatement in interface io.r2dbc.spi.Connectionsql - the SQL to execute, must not be nullMySqlStatement instanceIllegalArgumentException - if sql is nullMySqlConnectionMetadata getMetadata()
getMetadata in interface io.r2dbc.spi.ConnectionMySqlConnectionMetadata that contains the connection metadataMono<Void> releaseSavepoint(String name)
releaseSavepoint in interface io.r2dbc.spi.Connectionname - the savepoint name, must not be nullMono that indicates that the savepoint has been releasedIllegalArgumentException - if name is nullMono<Void> rollbackTransaction()
rollbackTransaction in interface io.r2dbc.spi.ConnectionMono that indicates that the transaction has been rolled backMono<Void> rollbackTransactionToSavepoint(String name)
rollbackTransactionToSavepoint in interface io.r2dbc.spi.Connectionname - the savepoint name, must not be nullMono that indicates that the transaction has been rolled back to the savepointIllegalArgumentException - if name is nullMono<Void> setAutoCommit(boolean autoCommit)
setAutoCommit in interface io.r2dbc.spi.ConnectionautoCommit - the auto-commit modeMono that indicates that the auto-commit mode has been setMono<Void> setLockWaitTimeout(Duration timeout)
Note: Currently, it should be used only for InnoDB storage engine.
setLockWaitTimeout in interface io.r2dbc.spi.Connectiontimeout - the lock wait timeout, must not be nullMono that indicates that the lock wait timeout has been setIllegalArgumentException - if timeout is nullMono<Void> setStatementTimeout(Duration timeout)
setStatementTimeout in interface io.r2dbc.spi.Connectiontimeout - the statement timeout, must not be nullMono that indicates that the statement timeout has been setIllegalArgumentException - if timeout is nullMono<Void> setTransactionIsolationLevel(io.r2dbc.spi.IsolationLevel isolationLevel)
setTransactionIsolationLevel in interface io.r2dbc.spi.ConnectionisolationLevel - the isolation level, must not be nullMono that indicates that the isolation level of the current session has been setIllegalArgumentException - if isolationLevel is nullMono<Boolean> validate(io.r2dbc.spi.ValidationDepth depth)
validate in interface io.r2dbc.spi.Connectiondepth - the validation depth, must not be nullMono that indicates that the connection has been validatedIllegalArgumentException - if depth is nullMono<Void> postAllocate()
postAllocate in interface io.r2dbc.spi.LifecycleMono that indicates that the connection is ready for usageCopyright © 2018–2024 asyncer.io. All rights reserved.