Package nz.co.gregs.dbvolution.databases
Class PostgresDBOverSSL
- java.lang.Object
-
- nz.co.gregs.dbvolution.databases.DBDatabase
-
- nz.co.gregs.dbvolution.databases.PostgresDB
-
- nz.co.gregs.dbvolution.databases.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nz.co.gregs.dbvolution.databases.DBDatabase
DBDatabase.ResponseToException, DBDatabase.RunRegularProcessors
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUID-
Fields inherited from class nz.co.gregs.dbvolution.databases.DBDatabase
storedConnection
-
Fields inherited from class nz.co.gregs.dbvolution.databases.PostgresDB
POSTGRES_DEFAULT_PORT, POSTGRES_DEFAULT_USERNAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPostgresDBOverSSL()Provides a convenient constructor for DBDatabases that have configuration details hardwired or are able to automatically retrieve the details.PostgresDBOverSSL(java.lang.String hostname, int port, java.lang.String databaseName, java.lang.String username, java.lang.String password)Creates a DBDatabase for a PostgreSQL database over SSL.PostgresDBOverSSL(java.lang.String hostname, int port, java.lang.String databaseName, java.lang.String username, java.lang.String password, java.lang.String urlExtras)Creates a DBDatabase for a PostgreSQL database over SSL.PostgresDBOverSSL(javax.sql.DataSource ds)Creates aDBDatabaseinstance for the data source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBDatabaseclone()Clones the DBDatabase.protected java.lang.Class<? extends DBDatabase>getBaseDBDatabaseClass()protected java.lang.StringgetUrlFromSettings(DatabaseConnectionSettings settings)-
Methods inherited from class nz.co.gregs.dbvolution.databases.DBDatabase
addRegularProcess, backupToDBDatabase, batchSQLStatementsWhenPossible, createForeignKeyConstraints, createIndexesOnAllFields, createOrUpdateTable, createTable, createTableNoExceptions, createTableNoExceptions, createTablesNoExceptions, createTablesNoExceptions, createTablesWithForeignKeysNoExceptions, createTableWithForeignKeys, delete, delete, deleteAll, discardConnection, doReadOnlyTransaction, doTransaction, doTransaction, dropAnyAssociatedDatabaseObjects, dropDatabase, dropDatabase, dropTable, dropTableIfExists, equals, executeDBAction, executeDBQuery, get, get, get, get, get, getAllRows, getBatchSQLStatementsWhenPossible, getByExample, getByExample, getByExamples, getConnection, getConnectionFromDriverManager, getCount, getCount, getDatabaseInstance, getDatabaseName, getDataSource, getDBMigration, getDBQuery, getDBQuery, getDBQuery, getDBQuery, getDBQueryInsert, getDBRecursiveQuery, getDBStatement, getDBTable, getDefinition, getDriverName, getExtras, getHost, getJdbcURL, getLabel, getLastException, getLowLevelStatement, getPassword, getPort, getPreventAccidentalDroppingOfDatabases, getPreventAccidentalDroppingOfTables, getPrintSQLBeforeExecuting, getRegularProcessors, getRegularThreadPool, getRows, getSchema, getSettings, getSQLForCreateTable, getSQLForDBQuery, getUsername, hashCode, implement, insert, insert, insert, insertOrUpdate, isDBDatabaseCluster, isMemoryDatabase, isPrintSQLBeforeExecuting, preventDDLDuringTransaction, preventDroppingOfDatabases, preventDroppingOfTables, print, printSQLIfRequested, removeForeignKeyConstraints, removeRegularProcess, save, save, save, setBatchSQLStatementsWhenPossible, setDatabaseName, setDefinition, setDefinitionBasedOnConnectionMetaData, setDriverName, setJdbcURL, setLabel, setLastException, setPassword, setPrintSQLBeforeExecuting, setSettings, setUsername, startServerIfRequired, stop, supportsPooledConnections, tableExists, test, toString, unusedConnection, update, update, updateAnyway, updateTableToMatchDBRow, willCreateBlankQuery
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from class nz.co.gregs.dbvolution.databases.PostgresDB
addDatabaseSpecificFeatures, addFeatureToFixException, createDatabase, createUser, dropTableNoExceptions, getDefaultPort, getSettingsFromJDBCURL, loadFromCSVFile
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
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
DBDefinitionMost 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.SQLExceptionCreates aDBDatabaseinstance 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.SQLExceptionCreates a DBDatabase for a PostgreSQL database over SSL.- Parameters:
hostname- host namedatabaseName- databaseNameport- portusername- usernamepassword- passwordurlExtras- 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.SQLExceptionCreates a DBDatabase for a PostgreSQL database over SSL.- Parameters:
hostname- host namepassword- passworddatabaseName- databaseNameport- portusername- username- Throws:
java.sql.SQLException- database errors
-
-
Method Detail
-
getUrlFromSettings
protected java.lang.String getUrlFromSettings(DatabaseConnectionSettings settings)
- Overrides:
getUrlFromSettingsin classPostgresDB
-
clone
public DBDatabase clone() throws java.lang.CloneNotSupportedException
Description copied from class:DBDatabaseClones the DBDatabase.Support DBvolution at Patreon
- Overrides:
clonein classPostgresDB- Returns:
- a clone of the DBDatabase.
- Throws:
java.lang.CloneNotSupportedException- not likely
-
getBaseDBDatabaseClass
protected java.lang.Class<? extends DBDatabase> getBaseDBDatabaseClass()
- Overrides:
getBaseDBDatabaseClassin classPostgresDB
-
-