use of io.helidon.tests.integration.dbclient.common.utils.RangePoJo in project helidon by oracle.
the class GetStatementIT method testGetMappedNamedParam.
/**
* Verify {@code namedParam(Object parameters)} mapped parameters setting method.
*
* @throws ExecutionException when database query failed
* @throws InterruptedException if the current thread was interrupted
*/
@Test
public void testGetMappedNamedParam() throws ExecutionException, InterruptedException {
RangePoJo range = new RangePoJo(0, 2);
Optional<DbRow> maybeRow = DB_CLIENT.execute(exec -> exec.createNamedGet("select-pokemons-idrng-named-arg").namedParam(range).execute()).toCompletableFuture().get();
verifyPokemonsIdRange(maybeRow, 0, 2);
}
use of io.helidon.tests.integration.dbclient.common.utils.RangePoJo in project helidon by oracle.
the class QueryStatementIT method testQueryMappedOrderParam.
/**
* Verify {@code indexedParam(Object parameters)} mapped parameters setting method.
*/
@Test
public void testQueryMappedOrderParam() {
RangePoJo range = new RangePoJo(1, 7);
Multi<DbRow> rows = DB_CLIENT.execute(exec -> exec.createNamedQuery("select-pokemons-idrng-order-arg").indexedParam(range).execute());
verifyPokemonsIdRange(rows, 1, 7);
}
use of io.helidon.tests.integration.dbclient.common.utils.RangePoJo in project helidon by oracle.
the class GetStatementIT method testGetMappedOrderParam.
/**
* Verify {@code indexedParam(Object parameters)} mapped parameters setting method.
*
* @throws ExecutionException when database query failed
* @throws InterruptedException if the current thread was interrupted
*/
@Test
public void testGetMappedOrderParam() throws ExecutionException, InterruptedException {
RangePoJo range = new RangePoJo(6, 8);
Optional<DbRow> maybeRow = DB_CLIENT.execute(exec -> exec.createNamedGet("select-pokemons-idrng-order-arg").indexedParam(range).execute()).toCompletableFuture().get();
verifyPokemonsIdRange(maybeRow, 6, 8);
}
use of io.helidon.tests.integration.dbclient.common.utils.RangePoJo in project helidon by oracle.
the class QueryStatementIT method testQueryMappedNamedParam.
/**
* Verify {@code namedParam(Object parameters)} mapped parameters setting method.
*/
@Test
public void testQueryMappedNamedParam() {
RangePoJo range = new RangePoJo(1, 7);
Multi<DbRow> rows = DB_CLIENT.execute(exec -> exec.createNamedQuery("select-pokemons-idrng-named-arg").namedParam(range).execute());
verifyPokemonsIdRange(rows, 1, 7);
}