Class ServiceConfig.Mysql

java.lang.Object
org.apache.opendal.ServiceConfig.Mysql
All Implemented Interfaces:
ServiceConfig
Enclosing interface:
ServiceConfig

public static class ServiceConfig.Mysql extends Object implements ServiceConfig
Configuration for service mysql.
  • Field Details

    • connectionString

      public final String connectionString

      This connection string is used to connect to the mysql service. There are url based formats.

      The format of connect string resembles the url format of the mysql client. The format is: [scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2...

      • mysql://user@localhost
      • mysql://user:password@localhost
      • mysql://user:password@localhost:3306
      • mysql://user:password@localhost:3306/db

      For more information, please refer to https://docs.rs/sqlx/latest/sqlx/mysql/struct.MySqlConnectOptions.html.

    • keyField

      public final String keyField

      The key field name for mysql.

    • root

      public final String root

      The root for mysql.

    • table

      public final String table

      The table name for mysql.

    • valueField

      public final String valueField

      The value field name for mysql.

  • Constructor Details

    • Mysql

      public Mysql()
  • Method Details

    • scheme

      public String scheme()
      Description copied from interface: ServiceConfig
      The scheme of the service.
      Specified by:
      scheme in interface ServiceConfig
      Returns:
      the scheme
    • configMap

      public Map<String,String> configMap()
      Description copied from interface: ServiceConfig
      Convert the structured config to a type erased config map.

      A map-valued field becomes one entry, under the field's option name, whose value is a JSON object string, such as assume_role_session_tags = {"Team":"data"}. The map's entries are not flattened into top-level entries. Its keys are sorted, an empty map becomes {}, and an unset field has no entry.

      Specified by:
      configMap in interface ServiceConfig
      Returns:
      the config map