Package io.vertx.mysqlclient
Interface MySQLBuilder
-
public interface MySQLBuilder
Entry point for building MySQL clients.
-
-
Method Summary
Static Methods Modifier and Type Method Description static ClientBuilder<SqlClient>
client()
Provide a builder for MySQL client backed by a connection pool.static SqlClient
client(Handler<ClientBuilder<SqlClient>> handler)
Build a client backed by a connection pool with the specifiedblock
argument.static ClientBuilder<Pool>
pool()
Provide a builder for MySQL pool of connectionsstatic Pool
pool(Handler<ClientBuilder<Pool>> block)
Build a pool with the specifiedblock
argument.
-
-
-
Method Detail
-
pool
static Pool pool(Handler<ClientBuilder<Pool>> block)
Build a pool with the specifiedblock
argument. Theblock
argument is usually a lambda that configures the provided builderExample usage:
Pool pool = PgBuilder.pool(builder -> builder.connectingTo(connectOptions));
- Returns:
- the pool as configured by the code
block
-
pool
static ClientBuilder<Pool> pool()
Provide a builder for MySQL pool of connectionsExample usage:
Pool pool = PgBuilder.pool().connectingTo(connectOptions).build()
-
client
static SqlClient client(Handler<ClientBuilder<SqlClient>> handler)
Build a client backed by a connection pool with the specifiedblock
argument. Theblock
argument is usually a lambda that configures the provided builderExample usage:
SqlClient client = PgBuilder.client(builder -> builder.connectingTo(connectOptions));
- Returns:
- the client as configured by the code
block
-
client
static ClientBuilder<SqlClient> client()
Provide a builder for MySQL client backed by a connection pool.Example usage:
SqlClient client = PgBuilder.client().connectingTo(connectOptions).build()
-
-