Package liquibase.ext.cosmosdb.database
Class CosmosConnection
- java.lang.Object
-
- liquibase.nosql.database.AbstractNoSqlConnection
-
- liquibase.ext.cosmosdb.database.CosmosConnection
-
- All Implemented Interfaces:
liquibase.database.DatabaseConnection,liquibase.servicelocator.PrioritizedService
public class CosmosConnection extends AbstractNoSqlConnection
-
-
Field Summary
Fields Modifier and Type Field Description static StringLIQUIBASE_EXTENSION_USER_AGENT_SUFFIX
-
Constructor Summary
Constructors Constructor Description CosmosConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()StringgetCatalog()StringgetConnectionUserName()intgetDatabaseMajorVersion()intgetDatabaseMinorVersion()StringgetDatabaseProductName()StringgetDatabaseProductVersion()StringgetURL()booleanisClosed()voidopen(String url, Driver driverObject, Properties driverProperties)Opens a CosmosConnection based Creates a new client with the given connection string.voidopen(CosmosConnectionString cosmosConnectionString, Driver driverObject, Properties driverProperties)booleansupports(String url)-
Methods inherited from class liquibase.nosql.database.AbstractNoSqlConnection
attached, commit, getAutoCommit, getPriority, nativeSQL, rollback, setAutoCommit
-
-
-
-
Field Detail
-
LIQUIBASE_EXTENSION_USER_AGENT_SUFFIX
public static final String LIQUIBASE_EXTENSION_USER_AGENT_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCatalog
public String getCatalog() throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
getDatabaseProductName
public String getDatabaseProductName() throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
getDatabaseProductVersion
public String getDatabaseProductVersion() throws liquibase.exception.DatabaseException
- Specified by:
getDatabaseProductVersionin interfaceliquibase.database.DatabaseConnection- Overrides:
getDatabaseProductVersionin classAbstractNoSqlConnection- Throws:
liquibase.exception.DatabaseException
-
getDatabaseMajorVersion
public int getDatabaseMajorVersion() throws liquibase.exception.DatabaseException- Specified by:
getDatabaseMajorVersionin interfaceliquibase.database.DatabaseConnection- Overrides:
getDatabaseMajorVersionin classAbstractNoSqlConnection- Throws:
liquibase.exception.DatabaseException
-
getDatabaseMinorVersion
public int getDatabaseMinorVersion() throws liquibase.exception.DatabaseException- Specified by:
getDatabaseMinorVersionin interfaceliquibase.database.DatabaseConnection- Overrides:
getDatabaseMinorVersionin classAbstractNoSqlConnection- 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
Opens a CosmosConnection based Creates a new client with the given connection string. Creates a database if not exists with the DatabaseName passed viaCosmosConnectionString.fromJsonConnectionString(String)Note: Intended for driver and library authors to associate extra driver metadata with the connections.
- Parameters:
url- connectionString the json format connection stringdriverObject- driverObject identifieddriverProperties- driverProperties passed through- Throws:
liquibase.exception.DatabaseException- See Also:
CosmosConnectionString
-
open
public void open(CosmosConnectionString cosmosConnectionString, Driver driverObject, Properties driverProperties) throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
supports
public boolean supports(String url)
-
close
public void close() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
-