Creates a new RichClient
connected to the logical
destination described by dest
.
Creates a new RichClient
connected to the logical
destination described by dest
.
the location to connect to, e.g. "host:port". See the user guide for details on destination names.
Creates a new RichClient
connected to the logical
destination described by dest
with the assigned
label
.
Creates a new RichClient
connected to the logical
destination described by dest
with the assigned
label
. The label
is used to scope client stats.
Whether the client supports unsigned integer fields
Whether the client supports unsigned integer fields
Don't set the CLIENT_FOUND_ROWS flag when establishing a new session.
Don't set the CLIENT_FOUND_ROWS flag when establishing a new session. This will make "INSERT ... ON DUPLICATE KEY UPDATE" statements return the "correct" update count.
See https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_row-count
The default character set used when establishing a new session.
The credentials to use when authenticating a new session.
The credentials to use when authenticating a new session.
if null
, no password is used.
Database to use when this client establishes a new session.
The maximum number of concurrent prepare statements.
Removes the module on the client which issues a ROLLBACK statement each time a service is put back into the pool.
Removes the module on the client which issues a ROLLBACK statement each time a service is put back into the pool. This may result in better performance at the risk of receiving a connection from the pool with uncommitted state.
Instead of disabling this feature, consider configuring the connection pool
for the client (via withSessionPool
) to offer more available connections.
the rollback module is installed by default.
https://dev.mysql.com/doc/en/implicit-commit.html
Installs a module on the client which issues a ROLLBACK statement when a service is put back into the pool.
Installs a module on the client which issues a ROLLBACK statement when a service is put back into the pool. This exists to ensure that a "clean" connection is always returned from the connection pool. For example, it prevents situations where an unfinished transaction has been written to the wire, the service has been released back into the pool, the same service is again checked out of the pool, and a statement that causes an implicit commit is issued.
The additional work incurred for the rollback may result in less throughput from the
connection pool and, as such, may require configuring the pool (via withSessionPool
)
to offer more available connections connections.
this module is installed by default.
https://dev.mysql.com/doc/en/implicit-commit.html
(Since version 2018-10-30) Use withStack(Stack[ServiceFactory[Req, Rep]] => Stack[ServiceFactory[Req, Rep]]) instead
Implements a mysql client in terms of a com.twitter.finagle.client.StackClient. The client inherits a wealth of features from finagle including connection pooling and load balancing.
Additionally, this class provides methods via MysqlRichClient for constructing a client which exposes an API that has use case specific methods, for example mysql.Client.read, mysql.Client.modify, and mysql.Client.prepare. This is an easier experience for most users.