Example usage for io.vertx.mysqlclient MySQLConnection setOption

List of usage examples for io.vertx.mysqlclient MySQLConnection setOption

Introduction

In this page you can find the example usage for io.vertx.mysqlclient MySQLConnection setOption.

Prototype

@Fluent
MySQLConnection setOption(MySQLSetOption option, Handler<AsyncResult<Void>> handler);

Source Link

Document

Send a SET_OPTION command to set options for the current connection.

Usage

From source file:examples.MySQLClientExamples.java

public void setOptionExample01(MySQLConnection connection) {
    connection.setOption(MySQLSetOption.MYSQL_OPTION_MULTI_STATEMENTS_OFF, ar -> {
        if (ar.succeeded()) {
            System.out.println("CLIENT_MULTI_STATEMENTS is off now");
        } else {//ww  w . j  a v a  2 s. co  m
            System.out.println("Failure: " + ar.cause().getMessage());
        }
    });
}