Example usage for io.vertx.mysqlclient MySQLConnectOptions addProperty

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

Introduction

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

Prototype

@GenIgnore
    @Override
    public MySQLConnectOptions addProperty(String key, String value) 

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);
}