package com.eversec.dbq;

import com.eversec.dbq.qtask.QTaskEs;
import com.eversec.dbq.qtask.QTaskMethod;
import com.eversec.dbq.qtask.QTaskMysql;

public class QRuner {

    private E e;

    public QRuner(E e) {
        this.e = e;
    }

    public Object query() {
        if ("mysql".equalsIgnoreCase(e.queryType)){
            return new QTaskMysql(e).execute();
        }else if ("bigData".equalsIgnoreCase(e.queryType)){
            return new QTaskEs(e).execute();
        }else if ("method".equalsIgnoreCase(e.queryType)){
            return new QTaskMethod(e).execute();
        }
        return null;
    }
}
