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

org.redkalex.source.parser.DataNativeJsqlParserProvider Maven / Gradle / Ivy

There is a newer version: 2.7.7
Show newest version
/*
 *
 */
package org.redkalex.source.parser;

import net.sf.jsqlparser.parser.*;
import org.redkale.annotation.Priority;
import org.redkale.source.*;
import org.redkale.source.spi.DataNativeSqlParserProvider;
import org.redkale.util.AnyValue;

/** @author zhangjx */
@Priority(-800)
public class DataNativeJsqlParserProvider implements DataNativeSqlParserProvider {

    @Override
    public boolean acceptsConf(AnyValue config) {
        try {
            // 加载jsqlparser类
            AbstractJSqlParser.class.isAssignableFrom(CCJSqlParser.class);
            return true;
        } catch (Throwable t) {
            return false;
        }
    }

    @Override
    public DataNativeSqlParser createInstance() {
        return new DataNativeJsqlParser();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy