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
public class MongoConnection extends AbstractNoSqlConnection
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PORTstatic StringMONGO_DNS_PREFIXstatic StringMONGO_PREFIXprotected com.mongodb.client.MongoClientmongoClientprotected com.mongodb.client.MongoDatabasemongoDatabase
-
Constructor Summary
Constructors Constructor Description MongoConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()StringgetCatalog()StringgetConnectionUserName()StringgetDatabaseProductName()StringgetURL()booleanisClosed()voidopen(String url, Driver driverObject, Properties driverProperties)booleansupports(String url)-
Methods inherited from class liquibase.nosql.database.AbstractNoSqlConnection
attached, commit, getAutoCommit, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductVersion, getPriority, nativeSQL, rollback, setAutoCommit
-
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
MONGO_PREFIX
public static final String MONGO_PREFIX
- See Also:
- Constant Field Values
-
MONGO_DNS_PREFIX
public static final String MONGO_DNS_PREFIX
- See Also:
- Constant Field Values
-
mongoClient
protected com.mongodb.client.MongoClient mongoClient
-
mongoDatabase
protected com.mongodb.client.MongoDatabase mongoDatabase
-
-
Method Detail
-
supports
public boolean supports(String url)
- Specified by:
supportsin interfaceliquibase.database.DatabaseConnection- Specified by:
supportsin classAbstractNoSqlConnection
-
getCatalog
public String getCatalog() throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
getDatabaseProductName
public String getDatabaseProductName() throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
getURL
public String getURL()
-
getConnectionUserName
public String 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
-
-