package io.vertx.ext.asyncsql.impl.pool;
import com.github.mauricio.async.db.Configuration;
import com.github.mauricio.async.db.Connection;
import com.github.mauricio.async.db.mysql.MySQLConnection;
import com.github.mauricio.async.db.mysql.util.CharsetMapper;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.asyncsql.impl.VertxEventLoopExecutionContext;
public class MysqlAsyncConnectionPool extends AsyncConnectionPool {
public MysqlAsyncConnectionPool(Vertx vertx, JsonObject globalConfig, Configuration connectionConfig) {
super(vertx, globalConfig, connectionConfig);
}
@Override
protected Connection create() {
return new MySQLConnection(connectionConfig, CharsetMapper.Instance(),
vertx.nettyEventLoopGroup().next(),
VertxEventLoopExecutionContext.create(vertx)
);
}
}