Class CosmosConnection

  • All Implemented Interfaces:
    liquibase.database.DatabaseConnection, liquibase.servicelocator.PrioritizedService

    public class CosmosConnection
    extends AbstractNoSqlConnection
    • Field Detail

      • LIQUIBASE_EXTENSION_USER_AGENT_SUFFIX

        public static final String LIQUIBASE_EXTENSION_USER_AGENT_SUFFIX
        See Also:
        Constant Field Values
    • Constructor Detail

      • CosmosConnection

        public CosmosConnection()
    • 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:
        getDatabaseProductVersion in interface liquibase.database.DatabaseConnection
        Overrides:
        getDatabaseProductVersion in class AbstractNoSqlConnection
        Throws:
        liquibase.exception.DatabaseException
      • getDatabaseMajorVersion

        public int getDatabaseMajorVersion()
                                    throws liquibase.exception.DatabaseException
        Specified by:
        getDatabaseMajorVersion in interface liquibase.database.DatabaseConnection
        Overrides:
        getDatabaseMajorVersion in class AbstractNoSqlConnection
        Throws:
        liquibase.exception.DatabaseException
      • getDatabaseMinorVersion

        public int getDatabaseMinorVersion()
                                    throws liquibase.exception.DatabaseException
        Specified by:
        getDatabaseMinorVersion in interface liquibase.database.DatabaseConnection
        Overrides:
        getDatabaseMinorVersion in class AbstractNoSqlConnection
        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 via CosmosConnectionString.fromJsonConnectionString(String)

        Note: Intended for driver and library authors to associate extra driver metadata with the connections.

        Parameters:
        url - connectionString the json format connection string
        driverObject - driverObject identified
        driverProperties - 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