package cz.moneta.test.harness.connectors.database;

import cz.moneta.test.harness.support.auth.Credentials;
import org.jooq.Record;
import org.jooq.Result;
import org.jooq.SQLDialect;

public class MsSqlConnector extends DatabaseConnector {

    private static final String windowsAuthenticationOption = ";integratedSecurity=true";

    public MsSqlConnector(String url, Credentials credentials) {
        super(url, credentials.getUsername(), credentials.getPassword());
    }

    public MsSqlConnector(String url) {
        super(url + windowsAuthenticationOption, "", "");
    }

    public Result<Record> executeSql(String sql) {
        return super.executeSql(sql, SQLDialect.SQLSERVER);
    }
}