Class PostgresDBOverSSL

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, SupportsPolygonDatatype

    public class PostgresDBOverSSL
    extends PostgresDB
    Extends the PostgreSQL database connection by adding SSL.

    Support DBvolution at Patreon

    Author:
    Gregory Graham
    See Also:
    Serialized Form
    • Constructor Detail

      • PostgresDBOverSSL

        protected PostgresDBOverSSL()
        Provides a convenient constructor for DBDatabases that have configuration details hardwired or are able to automatically retrieve the details.

        This constructor creates an empty DBDatabase with only the default settings, in particular with no driver, URL, username, password, or DBDefinition

        Most programmers should not call this constructor directly. Instead you should define a no-parameter constructor that supplies the details for creating an instance using a more complete constructor.

        DBDatabase encapsulates the knowledge of the database, in particular the syntax of the database in the DBDefinition and the connection details from a DataSource.

        See Also:
        DBDefinition
      • PostgresDBOverSSL

        public PostgresDBOverSSL​(javax.sql.DataSource ds)
                          throws java.sql.SQLException
        Creates a DBDatabase instance for the data source.
        Parameters:
        ds - ds
        Throws:
        java.sql.SQLException - database errors
      • PostgresDBOverSSL

        public PostgresDBOverSSL​(java.lang.String hostname,
                                 int port,
                                 java.lang.String databaseName,
                                 java.lang.String username,
                                 java.lang.String password,
                                 java.lang.String urlExtras)
                          throws java.sql.SQLException
        Creates a DBDatabase for a PostgreSQL database over SSL.
        Parameters:
        hostname - host name
        databaseName - databaseName
        port - port
        username - username
        password - password
        urlExtras - urlExtras
        Throws:
        java.sql.SQLException - database errors
      • PostgresDBOverSSL

        public PostgresDBOverSSL​(java.lang.String hostname,
                                 int port,
                                 java.lang.String databaseName,
                                 java.lang.String username,
                                 java.lang.String password)
                          throws java.sql.SQLException
        Creates a DBDatabase for a PostgreSQL database over SSL.
        Parameters:
        hostname - host name
        password - password
        databaseName - databaseName
        port - port
        username - username
        Throws:
        java.sql.SQLException - database errors