Class PostgresUtils
java.lang.Object
org.odpi.openmetadata.adapters.connectors.postgres.utilities.PostgresUtils
PostgresUtils provides simple functions to work with Postgres names and connection strings
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
databaseShouldBeCatalogued
(String databaseName, List<String> excludedDatabases, List<String> includedDatabases) Determine whether a particular database should be included.static String
getDatabaseURL
(String databaseServerURL, String databaseName) Convert the connection string for the database server into a connection string for the database.
-
Constructor Details
-
PostgresUtils
public PostgresUtils()
-
-
Method Details
-
databaseShouldBeCatalogued
public static boolean databaseShouldBeCatalogued(String databaseName, List<String> excludedDatabases, List<String> includedDatabases) Determine whether a particular database should be included.- Parameters:
databaseName
- name of the databaseexcludedDatabases
- configuration property to exclude databasesincludedDatabases
- configuration property to restrict included databases- Returns:
- flag indicating whether to work with the database
-
getDatabaseURL
Convert the connection string for the database server into a connection string for the database.- Parameters:
databaseServerURL
- connection string used to connect to the postgres databasedatabaseName
- name of the database- Returns:
- connection string
-