Class ServiceConfig.Postgresql

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

public static class ServiceConfig.Postgresql extends Object implements ServiceConfig
Configuration for service postgresql.
  • Field Details

    • connectionString

      public final String connectionString

      The URL should be with a scheme of either postgres:// or postgresql://.

      • postgresql://user@localhost
      • postgresql://user:password@%2Fvar%2Flib%2Fpostgresql/mydb?connect_timeout=10
      • postgresql://user@host1:1234,host2,host3:5678?target_session_attrs=read-write
      • postgresql:///mydb?user=user&host=/var/lib/postgresql

      For more information, please visit https://docs.rs/sqlx/latest/sqlx/postgres/struct.PgConnectOptions.html.

    • keyField

      public final String keyField

      the key field of postgresql

    • root

      public final String root

      Root of this backend.

      All operations will happen under this root.

      Default to / if not set.

    • table

      public final String table

      the table of postgresql

    • valueField

      public final String valueField

      the value field of postgresql

  • Constructor Details

    • Postgresql

      public Postgresql()
  • 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