Example usage for io.vertx.mysqlclient MySQLConnectOptions setCollation

List of usage examples for io.vertx.mysqlclient MySQLConnectOptions setCollation

Introduction

In this page you can find the example usage for io.vertx.mysqlclient MySQLConnectOptions setCollation.

Prototype

public MySQLConnectOptions setCollation(String collation) 

Source Link

Document

Set the collation for the connection.

Usage

From source file:examples.MySQLClientExamples.java

public void configureConnectionCollation() {
    MySQLConnectOptions connectOptions = new MySQLConnectOptions();

    // set connection collation to utf8_general_ci instead of the default collation utf8mb4_general_ci
    // setting a collation will override the charset option
    connectOptions.setCharset("gbk");
    connectOptions.setCollation("utf8_general_ci");
}