Search in sources :

Example 1 with DMLOperation

use of nl.topicus.jdbc.statement.AbstractTablePartWorker.DMLOperation in project spanner-jdbc by olavloite.

the class AbstractTablePartWorkerTest method createWorker.

private AbstractTablePartWorker createWorker(String sql, ParameterStore parameters) throws JSQLParserException {
    CloudSpannerConnection connection = mock(CloudSpannerConnection.class);
    Select select = (Select) CCJSqlParserUtil.parse(sql);
    DMLOperation operation = DMLOperation.INSERT;
    AbstractTablePartWorker worker = mock(AbstractTablePartWorker.class, withSettings().useConstructor(connection, select, parameters, true, operation).defaultAnswer(CALLS_REAL_METHODS));
    return worker;
}
Also used : DMLOperation(nl.topicus.jdbc.statement.AbstractTablePartWorker.DMLOperation) Select(net.sf.jsqlparser.statement.select.Select) CloudSpannerConnection(nl.topicus.jdbc.CloudSpannerConnection)

Aggregations

Select (net.sf.jsqlparser.statement.select.Select)1 CloudSpannerConnection (nl.topicus.jdbc.CloudSpannerConnection)1 DMLOperation (nl.topicus.jdbc.statement.AbstractTablePartWorker.DMLOperation)1