com.liquibase.ext.parser.XMLMongoshChangeLogParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquibase-commercial-mongodb Show documentation
Show all versions of liquibase-commercial-mongodb Show documentation
Liquibase Commercial Extension for MongoDB
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;
}
}