Example usage for io.vertx.mysqlclient MySQLConnectOptions setProperties

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

Introduction

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

Prototype

@Override
    public MySQLConnectOptions setProperties(Map<String, String> properties) 

Source Link

Usage

From source file:examples.MySQLClientExamples.java

public void configureConnectionAttributes() {
    // Data object
    MySQLConnectOptions connectOptions = new MySQLConnectOptions();

    // Add a connection attribute
    connectOptions.addProperty("_java_version", "1.8.0_212");

    // Override the attributes
    Map<String, String> attributes = new HashMap<>();
    attributes.put("_client_name", "myapp");
    attributes.put("_client_version", "1.0.0");
    connectOptions.setProperties(attributes);
}