package cz.moneta.test.dsl.udebs;

import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.endpoints.udebs.UdebsEndpoint;
import org.jooq.Record;
import org.jooq.Result;

public class FromWPsd2TokensBuilder {
    private final StoreAccessor harness;

    public FromWPsd2TokensBuilder(StoreAccessor harness) {
        this.harness = harness;
    }

    public Result<Record> selectFromW_psd2_tokens(String token) {
        return harness.getEndpoint(UdebsEndpoint.class)
                .executeSql("SELECT PACKAGEID FROM W_PSD2_TOKENS WHERE " +
                        "TOKEN = '" + token + "' " );
    }
}
