java.lang.Object
io.debezium.connector.postgresql.connection.ServerInfo

public class ServerInfo extends Object
Information about a running Postgres instance.
Author:
Horia Chiorean (hchiorea@redhat.com)
  • Field Details

    • server

      private String server
    • username

      private String username
    • database

      private String database
    • permissionsByRoleName

      private Map<String,String> permissionsByRoleName
    • majorVersion

      private Integer majorVersion
  • Constructor Details

    • ServerInfo

      protected ServerInfo()
  • Method Details

    • withServer

      protected ServerInfo withServer(String server)
    • withUsername

      protected ServerInfo withUsername(String username)
    • withDatabase

      protected ServerInfo withDatabase(String database)
    • addRole

      protected ServerInfo addRole(String roleName, String permissions)
    • withMajorVersion

      public ServerInfo withMajorVersion(Integer majorVersion)
    • server

      public String server()
      Returns information about the server machine
      Returns:
      a String, possibly null if info was not available
    • username

      public String username()
      Returns the name of the user of a connection
      Returns:
      a String, possibly null if info was not available
    • database

      public String database()
      Returns the name of a database for which a connection was established
      Returns:
      a String, possibly null if info was not available
    • permissionsByRoleName

      public Map<String,String> permissionsByRoleName()
      Returns information about the role names and permissions of the current user
      Returns:
      a Map of role information, keyed by role name; never null but possibly empty
    • version

      public Integer version()
      Returns the version num of a database for which a connection was established
      Returns:
      an Integer, possibly null if info was not available
    • toString

      public String toString()
      Overrides:
      toString in class Object