Package liquibase.ext.mongodb.database
Class MongoConnection
java.lang.Object
liquibase.nosql.database.AbstractNoSqlConnection
liquibase.ext.mongodb.database.MongoConnection
- All Implemented Interfaces:
AutoCloseable,liquibase.database.DatabaseConnection,liquibase.servicelocator.PrioritizedService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic final Stringprotected com.mongodb.client.MongoClientprotected com.mongodb.client.MongoDatabaseFields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getURL()booleanisClosed()voidopen(String url, Driver driverObject, Properties driverProperties) static voidshowErrorMessageIfSomeRequiredDependenciesAreNotPresent(boolean isMongodbConnection) booleanMethods inherited from class liquibase.nosql.database.AbstractNoSqlConnection
attached, commit, getAutoCommit, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductVersion, getPriority, nativeSQL, rollback, setAutoCommit
-
Field Details
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
MONGO_PREFIX
- See Also:
-
MONGO_DNS_PREFIX
- See Also:
-
mongoClient
protected com.mongodb.client.MongoClient mongoClient -
mongoDatabase
protected com.mongodb.client.MongoDatabase mongoDatabase
-
-
Constructor Details
-
MongoConnection
public MongoConnection()
-
-
Method Details
-
supports
- Specified by:
supportsin interfaceliquibase.database.DatabaseConnection- Specified by:
supportsin classAbstractNoSqlConnection
-
showErrorMessageIfSomeRequiredDependenciesAreNotPresent
public static void showErrorMessageIfSomeRequiredDependenciesAreNotPresent(boolean isMongodbConnection) -
getCatalog
- Throws:
liquibase.exception.DatabaseException
-
getDatabaseProductName
- Throws:
liquibase.exception.DatabaseException
-
getURL
-
getConnectionUserName
-
isClosed
public boolean isClosed() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
open
public void open(String url, Driver driverObject, Properties driverProperties) throws liquibase.exception.DatabaseException - Throws:
liquibase.exception.DatabaseException
-
close
public void close() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-