Class PostgreSqlDriverFactory

java.lang.Object
dev.array21.jdbd.drivers.PostgreSqlDriverFactory

public class PostgreSqlDriverFactory extends Object
  • Constructor Details

    • PostgreSqlDriverFactory

      public PostgreSqlDriverFactory()
  • Method Details

    • setHost

      public PostgreSqlDriverFactory setHost(String host)
      Set the PostgreSQL host
      Parameters:
      host - The host to set
      Returns:
      The current factory
    • setUsername

      public PostgreSqlDriverFactory setUsername(String username)
      Set the PostgreSQL username
      Parameters:
      username - The username to set
      Returns:
      The current factory
    • setPassword

      public PostgreSqlDriverFactory setPassword(String password)
      Set the PostgreSQL password
      Parameters:
      password - The password to set
      Returns:
      The current factory
    • setDatabase

      public PostgreSqlDriverFactory setDatabase(String database)
      Set the PostgreSQL database
      Parameters:
      database - The database to set
      Returns:
      The current factory
    • build

      public PostgreSqlDriver build() throws IOException
      Build the PostgreSqlDriver. Throws an IllegalStateException when:
      • The host is unsert
      • The database is unset

      Thread Safety

      It is up to the implementer to guarantee that this method is NOT called from two threads simultaneously, this can result in Undefined Behaviour
      Returns:
      Return an instance of the PostgreSqlDriver
      Throws:
      IOException - When saving the native library failed
      UnsatisfiedLinkError - When loading the native library failed
      UnsupportedOperatingSystemException - When the current operating system is unsupported