All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liquibase.ext.parser.XMLMongoshChangeLogParser Maven / Gradle / Ivy

The newest version!
package com.liquibase.ext.parser;

import liquibase.changelog.ChangeLogParameters;
import liquibase.changelog.DatabaseChangeLog;
import liquibase.exception.ChangeLogParseException;
import liquibase.parser.core.xml.XMLChangeLogSAXParser;
import liquibase.resource.ResourceAccessor;

public class XMLMongoshChangeLogParser extends XMLChangeLogSAXParser {

    @Override
    public DatabaseChangeLog parse(String physicalChangeLogLocation, ChangeLogParameters changeLogParameters, ResourceAccessor resourceAccessor) throws ChangeLogParseException {
        DatabaseChangeLog databaseChangeLog = super.parse(physicalChangeLogLocation, changeLogParameters, resourceAccessor);

        return ChangeLogErrorHandler.parse(databaseChangeLog, physicalChangeLogLocation, "runWith=\"mongosh\"");
    }

    @Override
    public int getPriority() {
        return super.getPriority() + 1;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy