Example usage for io.vertx.mysqlclient MySQLConnection specifySchema

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

Introduction

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

Prototype

@Fluent
MySQLConnection specifySchema(String schemaName, Handler<AsyncResult<Void>> handler);

Source Link

Document

Send a INIT_DB command to change the default schema of the connection.

Usage

From source file:examples.MySQLClientExamples.java

public void initDbExample(MySQLConnection connection) {
    connection.specifySchema("newschema", ar -> {
        if (ar.succeeded()) {
            System.out.println("Default schema changed to newschema");
        } else {//from   www  .  j  a  v  a  2  s. c  o m
            System.out.println("Failure: " + ar.cause().getMessage());
        }
    });
}