Implements a mysql client in terms of a com.twitter.finagle.client.StackClient.
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.
import com.twitter.finagle.Mysql import com.twitter.finagle.mysql.Client import com.twitter.util.Future val client: Client = Mysql.client .withCredentials("username", "password") .withDatabase("database") .newRichClient("host:port") val names: Future[Seq[String]] = client.select("SELECT name FROM employee") { row => row.stringOrNull("name") }
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