Search in sources :

Example 6 with FieldException

use of org.folio.cql2pgjson.exception.FieldException in project raml-module-builder by folio-org.

the class BooksDemoAPI method getRmbtestsTest.

@Validate
@Override
public void getRmbtestsTest(String query, RoutingContext routingContext, Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
    switch(query == null ? "null" : query) {
        case "badclass=true":
            PgUtil.streamGet(TABLE, /* can not be deserialized */
            StringBuilder.class, null, 0, 10, new LinkedList<>(), "books", routingContext, okapiHeaders, vertxContext);
            break;
        case "nullpointer=true":
            PgUtil.streamGet(TABLE, Book.class, null, 0, 10, null, "books", routingContext, /* okapiHeaders is null which results in exception */
            null, vertxContext);
            break;
        case "slim=true":
            PgUtil.streamGet(TABLE, SlimBook.class, null, 0, 10, new LinkedList<>(), "books", routingContext, okapiHeaders, vertxContext);
            break;
        case "wrapper=true":
            try {
                CQLWrapper wrapper = new CQLWrapper(new CQL2PgJSON("jsonb"), "cql.allRecords=true");
                PgUtil.streamGet(TABLE, Book.class, wrapper, null, "books", routingContext, okapiHeaders, vertxContext);
            } catch (FieldException e) {
                GetRmbtestsTestResponse.respond500WithTextPlain(e.getMessage());
            }
            break;
        default:
            PgUtil.streamGet(TABLE, Book.class, query, 0, 10, new LinkedList<>(), "books", routingContext, okapiHeaders, vertxContext);
    }
}
Also used : CQL2PgJSON(org.folio.cql2pgjson.CQL2PgJSON) FieldException(org.folio.cql2pgjson.exception.FieldException) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper) Validate(org.folio.rest.annotations.Validate)

Example 7 with FieldException

use of org.folio.cql2pgjson.exception.FieldException in project raml-module-builder by folio-org.

the class PgUtil method getWithOptimizedSql.

/**
 * Run the cql query using optimized SQL (if possible) or standard SQL.
 * <p>
 * PostgreSQL has no statistics about a field within a JSONB resulting in bad performance.
 * <p>
 * This method requires that the sortField has a b-tree index (non-unique) and caseSensitive=false
 * and removeAccents=true, and that the cql query is supported by a full text index.
 * <p>
 * This method starts a full table scan until getOptimizedSqlSize() records have been scanned.
 * Then it assumes that there are only a few result records and uses the full text match.
 * If the requested number of records have been found it stops immediately.
 *  @param table
 * @param clazz
 * @param cql
 * @param queryTimeout query timeout in milliseconds, or 0 for no timeout
 * @param okapiHeaders
 * @param vertxContext
 * @param responseDelegateClass
 * @return
 */
public static <T, C> Future<Response> getWithOptimizedSql(String table, Class<T> clazz, Class<C> collectionClazz, String sortField, String cql, int offset, int limit, int queryTimeout, Map<String, String> okapiHeaders, Context vertxContext, Class<? extends ResponseDelegate> responseDelegateClass) {
    final Method respond500;
    try {
        respond500 = responseDelegateClass.getMethod(RESPOND_500_WITH_TEXT_PLAIN, Object.class);
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
        return response(e.getMessage(), null, null);
    }
    final Method respond200;
    final Method respond400;
    try {
        respond200 = responseDelegateClass.getMethod(RESPOND_200_WITH_APPLICATION_JSON, collectionClazz);
        respond400 = responseDelegateClass.getMethod(RESPOND_400_WITH_TEXT_PLAIN, Object.class);
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
        return response(e.getMessage(), respond500, respond500);
    }
    try {
        CQL2PgJSON cql2pgJson = new CQL2PgJSON(table + "." + JSON_COLUMN);
        CQLWrapper cqlWrapper = new CQLWrapper(cql2pgJson, cql, limit, offset);
        PreparedCQL preparedCql = new PreparedCQL(table, cqlWrapper, okapiHeaders);
        String sql = generateOptimizedSql(sortField, preparedCql, offset, limit);
        if (sql == null) {
            // the cql is not suitable for optimization, generate simple sql
            return get(preparedCql, clazz, collectionClazz, okapiHeaders, vertxContext, responseDelegateClass);
        }
        logger.info("Optimized SQL generated. Source CQL: " + cql);
        Promise<Response> promise = Promise.promise();
        PostgresClient postgresClient = postgresClient(vertxContext, okapiHeaders);
        postgresClient.select(sql, queryTimeout, reply -> {
            try {
                if (reply.failed()) {
                    Throwable cause = reply.cause();
                    logger.error("Optimized SQL failed: " + cause.getMessage() + ": " + sql, cause);
                    response(cause.getMessage(), respond500, respond500).onComplete(promise);
                    return;
                }
                C collection = collection(clazz, collectionClazz, reply.result(), offset, limit);
                response(collection, respond200, respond500).onComplete(promise);
            } catch (Exception e) {
                logger.error(e.getMessage(), e);
                response(e.getMessage(), respond500, respond500).onComplete(promise);
            }
        });
        return promise.future();
    } catch (FieldException | QueryValidationException e) {
        logger.error(e.getMessage(), e);
        return response(e.getMessage(), respond400, respond500);
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
        return response(e.getMessage(), respond500, respond500);
    }
}
Also used : Method(java.lang.reflect.Method) FieldException(org.folio.cql2pgjson.exception.FieldException) InvocationTargetException(java.lang.reflect.InvocationTargetException) QueryValidationException(org.folio.cql2pgjson.exception.QueryValidationException) CQLParseException(org.z3950.zing.cql.CQLParseException) CQLFeatureUnsupportedException(org.folio.cql2pgjson.exception.CQLFeatureUnsupportedException) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) Response(javax.ws.rs.core.Response) HttpServerResponse(io.vertx.core.http.HttpServerResponse) CQL2PgJSON(org.folio.cql2pgjson.CQL2PgJSON) FieldException(org.folio.cql2pgjson.exception.FieldException) QueryValidationException(org.folio.cql2pgjson.exception.QueryValidationException) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper)

Example 8 with FieldException

use of org.folio.cql2pgjson.exception.FieldException in project raml-module-builder by folio-org.

the class PostgresClientTransactionsIT method updateTransaction.

private void updateTransaction(TestContext context) {
    PostgresClient c1 = PostgresClient.getInstance(vertx, tenant);
    Async async = context.async();
    // create connection
    c1.startTx(handler -> {
        if (handler.succeeded()) {
            SimplePojo z = new SimplePojo();
            z.setId("1");
            z.setName("me");
            // update record
            CQL2PgJSON cql2pgJson = null;
            try {
                cql2pgJson = new CQL2PgJSON(table + ".jsonb");
            } catch (FieldException e1) {
                e1.printStackTrace();
                context.fail(e1);
            }
            CQLWrapper cql = new CQLWrapper(cql2pgJson, "name==d");
            c1.update(handler, "z", z, cql, true, reply -> {
                if (reply.succeeded()) {
                    // make sure record is not updated since not committed yet
                    c1.select("SELECT jsonb->>'name' FROM " + fullTable, reply2 -> {
                        if (!reply2.succeeded()) {
                            context.fail(reply2.cause());
                        }
                        try {
                            String name = reply2.result().iterator().next().getString(0);
                            context.assertEquals("d", name, "Name property should not have been changed");
                        } catch (Exception e) {
                            e.printStackTrace();
                            context.fail(e.getMessage());
                        }
                        // end transaction / commit
                        c1.endTx(handler, done -> {
                            if (done.succeeded()) {
                                // record should have been updated
                                c1.select("SELECT jsonb->>'name' FROM " + fullTable, selectReply -> {
                                    if (!selectReply.succeeded()) {
                                        context.fail(selectReply.cause());
                                    } else {
                                        try {
                                            String name = selectReply.result().iterator().next().getString(0);
                                            context.assertEquals("me", name, "Name property should have been changed");
                                        } catch (Exception e) {
                                            e.printStackTrace();
                                            context.fail(e.getMessage());
                                        }
                                        async.complete();
                                    }
                                });
                            } else {
                                context.fail(done.cause());
                            }
                        });
                    });
                } else {
                    context.fail(reply.cause());
                }
            });
        } else {
            context.fail(handler.cause());
        }
    });
    async.await(5000);
    c1.closeClient(context.asyncAssertSuccess());
}
Also used : CQL2PgJSON(org.folio.cql2pgjson.CQL2PgJSON) FieldException(org.folio.cql2pgjson.exception.FieldException) Async(io.vertx.ext.unit.Async) SimplePojo(org.folio.rest.persist.helpers.SimplePojo) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper) FieldException(org.folio.cql2pgjson.exception.FieldException)

Example 9 with FieldException

use of org.folio.cql2pgjson.exception.FieldException in project raml-module-builder by folio-org.

the class PostgresClientIT method getCQLWrapperFailure.

@Test
public void getCQLWrapperFailure(TestContext context) throws IOException, FieldException {
    final String tableDefiniton = "id UUID PRIMARY KEY , jsonb JSONB NOT NULL, distinct_test_field TEXT";
    createTableWithPoLines(context, MOCK_POLINES_TABLE, tableDefiniton);
    CQL2PgJSON cql2pgJson = new CQL2PgJSON("jsonb");
    {
        CQLWrapper cqlWrapper = new CQLWrapper(cql2pgJson, // syntax error
        "cql.allRecords=");
        Async async = context.async();
        postgresClient.get(MOCK_POLINES_TABLE, Object.class, "*", cqlWrapper, true, true, null, null, /*facets*/
        handler -> {
            context.assertTrue(handler.failed());
            async.complete();
        });
        async.awaitSuccess();
    }
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) TestContext(io.vertx.ext.unit.TestContext) RowStream(io.vertx.sqlclient.RowStream) Arrays(java.util.Arrays) PgNotification(io.vertx.pgclient.PgNotification) TransactionRollbackException(io.vertx.sqlclient.TransactionRollbackException) VertxUtils(org.folio.rest.tools.utils.VertxUtils) Tuple(io.vertx.sqlclient.Tuple) UpdateSection(org.folio.rest.persist.Criteria.UpdateSection) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) RowIterator(io.vertx.sqlclient.RowIterator) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) SqlResult(io.vertx.sqlclient.SqlResult) After(org.junit.After) JsonObject(io.vertx.core.json.JsonObject) Offset(org.folio.rest.persist.Criteria.Offset) Collector(java.util.stream.Collector) Transaction(io.vertx.sqlclient.Transaction) AfterClass(org.junit.AfterClass) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) RowImpl(io.vertx.pgclient.impl.RowImpl) Set(java.util.Set) UUID(java.util.UUID) FieldException(org.folio.cql2pgjson.exception.FieldException) Future(io.vertx.core.Future) StandardCharsets(java.nio.charset.StandardCharsets) UncheckedIOException(java.io.UncheckedIOException) IOUtils(org.apache.commons.io.IOUtils) CQL2PgJSON(org.folio.cql2pgjson.CQL2PgJSON) Base64(java.util.Base64) List(java.util.List) Stream(java.util.stream.Stream) Criterion(org.folio.rest.persist.Criteria.Criterion) Results(org.folio.rest.persist.interfaces.Results) Facet(org.folio.rest.jaxrs.model.Facet) RowDesc(io.vertx.sqlclient.impl.RowDesc) Async(io.vertx.ext.unit.Async) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper) BeforeClass(org.junit.BeforeClass) FacetField(org.folio.rest.persist.facets.FacetField) PostgresTesterContainer(org.folio.postgres.testing.PostgresTesterContainer) Criteria(org.folio.rest.persist.Criteria.Criteria) CoreMatchers.not(org.hamcrest.CoreMatchers.not) RunWith(org.junit.runner.RunWith) Timeout(io.vertx.ext.unit.junit.Timeout) ResultInfo(org.folio.rest.jaxrs.model.ResultInfo) Function(java.util.function.Function) TotaledResults(org.folio.rest.persist.PostgresClient.TotaledResults) ArrayList(java.util.ArrayList) PreparedStatement(io.vertx.sqlclient.PreparedStatement) HashSet(java.util.HashSet) CompositeFuture(io.vertx.core.CompositeFuture) Poline(org.folio.rest.persist.helpers.Poline) PrepareOptions(io.vertx.sqlclient.PrepareOptions) SqlConnection(io.vertx.sqlclient.SqlConnection) Limit(org.folio.rest.persist.Criteria.Limit) QueryHelper(org.folio.rest.persist.PostgresClient.QueryHelper) RowSet(io.vertx.sqlclient.RowSet) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) AsyncResult(io.vertx.core.AsyncResult) LinkedList(java.util.LinkedList) DatabaseMetadata(io.vertx.sqlclient.spi.DatabaseMetadata) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) Before(org.junit.Before) Files(java.nio.file.Files) Query(io.vertx.sqlclient.Query) Promise(io.vertx.core.Promise) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Vertx(io.vertx.core.Vertx) PgPool(io.vertx.pgclient.PgPool) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) Test(org.junit.Test) VertxUnitRunner(io.vertx.ext.unit.junit.VertxUnitRunner) PreparedQuery(io.vertx.sqlclient.PreparedQuery) JsonArray(io.vertx.core.json.JsonArray) PgConnection(io.vertx.pgclient.PgConnection) Rule(org.junit.Rule) Paths(java.nio.file.Paths) Row(io.vertx.sqlclient.Row) LocalRowSet(org.folio.rest.persist.helpers.LocalRowSet) Handler(io.vertx.core.Handler) SimplePojo(org.folio.rest.persist.helpers.SimplePojo) Collections(java.util.Collections) InputStream(java.io.InputStream) CQL2PgJSON(org.folio.cql2pgjson.CQL2PgJSON) Async(io.vertx.ext.unit.Async) JsonObject(io.vertx.core.json.JsonObject) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper) Test(org.junit.Test)

Example 10 with FieldException

use of org.folio.cql2pgjson.exception.FieldException in project raml-module-builder by folio-org.

the class PostgresClientIT method getCQLWrapperWithFacets.

@Test
public void getCQLWrapperWithFacets(TestContext context) throws FieldException {
    final String tableDefiniton = "id UUID PRIMARY KEY , jsonb JSONB NOT NULL, distinct_test_field TEXT";
    createTableWithPoLines(context, MOCK_POLINES_TABLE, tableDefiniton);
    CQL2PgJSON cql2pgJson = new CQL2PgJSON("jsonb");
    List<FacetField> facets = List.of(new FacetField("jsonb->>'edition'"));
    {
        CQLWrapper cqlWrapper = new CQLWrapper(cql2pgJson, "cql.allRecords=1");
        Async async = context.async();
        postgresClient.get(MOCK_POLINES_TABLE, Object.class, "*", cqlWrapper, true, true, facets, null, handler -> {
            context.assertTrue(handler.succeeded());
            ResultInfo resultInfo = handler.result().getResultInfo();
            context.assertEquals(6, resultInfo.getTotalRecords());
            List<Facet> retFacets = resultInfo.getFacets();
            context.assertEquals(1, retFacets.size());
            async.complete();
        });
        async.awaitSuccess();
    }
    String distinctOn = "jsonb->>'order_format'";
    {
        CQLWrapper cqlWrapper = new CQLWrapper(cql2pgJson, "cql.allRecords=1");
        Async async = context.async();
        postgresClient.get(MOCK_POLINES_TABLE, Object.class, "*", cqlWrapper, true, true, facets, distinctOn, handler -> {
            context.assertTrue(handler.succeeded());
            ResultInfo resultInfo = handler.result().getResultInfo();
            context.assertEquals(4, resultInfo.getTotalRecords());
            List<Facet> retFacets = resultInfo.getFacets();
            context.assertEquals(1, retFacets.size());
            async.complete();
        });
        async.awaitSuccess();
    }
    {
        CQLWrapper cqlWrapper = new CQLWrapper(cql2pgJson, "order_format==Other");
        Async async = context.async();
        postgresClient.get(MOCK_POLINES_TABLE, Object.class, "*", cqlWrapper, true, true, facets, distinctOn, context.asyncAssertSuccess(res -> {
            ResultInfo resultInfo = res.getResultInfo();
            context.assertEquals(1, resultInfo.getTotalRecords());
            List<Object> objs = res.getResults();
            ObjectMapper mapper = new ObjectMapper();
            List<Facet> retFacets = resultInfo.getFacets();
            context.assertEquals(1, retFacets.size());
            context.assertEquals("edition", retFacets.get(0).getType());
            context.assertEquals(1, retFacets.get(0).getFacetValues().get(0).getCount());
            context.assertEquals("First edition", retFacets.get(0).getFacetValues().get(0).getValue().toString());
            context.assertEquals(1, objs.size());
            try {
                context.assertEquals("70fb4e66-cdf1-11e8-a8d5-f2801f1b9fd1", new JsonObject(mapper.writeValueAsString(objs.get(0))).getString("id"));
            } catch (JsonProcessingException e) {
                context.fail(e);
            }
            async.complete();
        }));
        async.awaitSuccess();
    }
    {
        CQLWrapper cqlWrapper = new CQLWrapper(cql2pgJson, "order_format==Other");
        Async async = context.async();
        postgresClient.get(MOCK_POLINES_TABLE, Poline.class, "*", cqlWrapper, true, true, facets, distinctOn, context.asyncAssertSuccess(res -> {
            ResultInfo resultInfo = res.getResultInfo();
            context.assertEquals(1, resultInfo.getTotalRecords());
            List<Poline> objs = res.getResults();
            List<Facet> retFacets = resultInfo.getFacets();
            context.assertEquals(1, retFacets.size());
            context.assertEquals("edition", retFacets.get(0).getType());
            context.assertEquals(1, retFacets.get(0).getFacetValues().get(0).getCount());
            context.assertEquals("First edition", retFacets.get(0).getFacetValues().get(0).getValue().toString());
            context.assertEquals(1, objs.size());
            context.assertEquals("70fb4e66-cdf1-11e8-a8d5-f2801f1b9fd1", objs.get(0).getId());
            async.complete();
        }));
        async.awaitSuccess();
    }
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) TestContext(io.vertx.ext.unit.TestContext) RowStream(io.vertx.sqlclient.RowStream) Arrays(java.util.Arrays) PgNotification(io.vertx.pgclient.PgNotification) TransactionRollbackException(io.vertx.sqlclient.TransactionRollbackException) VertxUtils(org.folio.rest.tools.utils.VertxUtils) Tuple(io.vertx.sqlclient.Tuple) UpdateSection(org.folio.rest.persist.Criteria.UpdateSection) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) RowIterator(io.vertx.sqlclient.RowIterator) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) SqlResult(io.vertx.sqlclient.SqlResult) After(org.junit.After) JsonObject(io.vertx.core.json.JsonObject) Offset(org.folio.rest.persist.Criteria.Offset) Collector(java.util.stream.Collector) Transaction(io.vertx.sqlclient.Transaction) AfterClass(org.junit.AfterClass) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) RowImpl(io.vertx.pgclient.impl.RowImpl) Set(java.util.Set) UUID(java.util.UUID) FieldException(org.folio.cql2pgjson.exception.FieldException) Future(io.vertx.core.Future) StandardCharsets(java.nio.charset.StandardCharsets) UncheckedIOException(java.io.UncheckedIOException) IOUtils(org.apache.commons.io.IOUtils) CQL2PgJSON(org.folio.cql2pgjson.CQL2PgJSON) Base64(java.util.Base64) List(java.util.List) Stream(java.util.stream.Stream) Criterion(org.folio.rest.persist.Criteria.Criterion) Results(org.folio.rest.persist.interfaces.Results) Facet(org.folio.rest.jaxrs.model.Facet) RowDesc(io.vertx.sqlclient.impl.RowDesc) Async(io.vertx.ext.unit.Async) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper) BeforeClass(org.junit.BeforeClass) FacetField(org.folio.rest.persist.facets.FacetField) PostgresTesterContainer(org.folio.postgres.testing.PostgresTesterContainer) Criteria(org.folio.rest.persist.Criteria.Criteria) CoreMatchers.not(org.hamcrest.CoreMatchers.not) RunWith(org.junit.runner.RunWith) Timeout(io.vertx.ext.unit.junit.Timeout) ResultInfo(org.folio.rest.jaxrs.model.ResultInfo) Function(java.util.function.Function) TotaledResults(org.folio.rest.persist.PostgresClient.TotaledResults) ArrayList(java.util.ArrayList) PreparedStatement(io.vertx.sqlclient.PreparedStatement) HashSet(java.util.HashSet) CompositeFuture(io.vertx.core.CompositeFuture) Poline(org.folio.rest.persist.helpers.Poline) PrepareOptions(io.vertx.sqlclient.PrepareOptions) SqlConnection(io.vertx.sqlclient.SqlConnection) Limit(org.folio.rest.persist.Criteria.Limit) QueryHelper(org.folio.rest.persist.PostgresClient.QueryHelper) RowSet(io.vertx.sqlclient.RowSet) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) AsyncResult(io.vertx.core.AsyncResult) LinkedList(java.util.LinkedList) DatabaseMetadata(io.vertx.sqlclient.spi.DatabaseMetadata) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) Before(org.junit.Before) Files(java.nio.file.Files) Query(io.vertx.sqlclient.Query) Promise(io.vertx.core.Promise) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Vertx(io.vertx.core.Vertx) PgPool(io.vertx.pgclient.PgPool) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) Test(org.junit.Test) VertxUnitRunner(io.vertx.ext.unit.junit.VertxUnitRunner) PreparedQuery(io.vertx.sqlclient.PreparedQuery) JsonArray(io.vertx.core.json.JsonArray) PgConnection(io.vertx.pgclient.PgConnection) Rule(org.junit.Rule) Paths(java.nio.file.Paths) Row(io.vertx.sqlclient.Row) LocalRowSet(org.folio.rest.persist.helpers.LocalRowSet) Handler(io.vertx.core.Handler) SimplePojo(org.folio.rest.persist.helpers.SimplePojo) Collections(java.util.Collections) InputStream(java.io.InputStream) Poline(org.folio.rest.persist.helpers.Poline) FacetField(org.folio.rest.persist.facets.FacetField) JsonObject(io.vertx.core.json.JsonObject) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) CQL2PgJSON(org.folio.cql2pgjson.CQL2PgJSON) Async(io.vertx.ext.unit.Async) JsonObject(io.vertx.core.json.JsonObject) List(java.util.List) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) ResultInfo(org.folio.rest.jaxrs.model.ResultInfo) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Facet(org.folio.rest.jaxrs.model.Facet) Test(org.junit.Test)

Aggregations

JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)11 Async (io.vertx.ext.unit.Async)11 IOException (java.io.IOException)11 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)10 AsyncResult (io.vertx.core.AsyncResult)10 CompositeFuture (io.vertx.core.CompositeFuture)10 Future (io.vertx.core.Future)10 Handler (io.vertx.core.Handler)10 Promise (io.vertx.core.Promise)10 Vertx (io.vertx.core.Vertx)10 JsonArray (io.vertx.core.json.JsonArray)10 JsonObject (io.vertx.core.json.JsonObject)10 TestContext (io.vertx.ext.unit.TestContext)10 Timeout (io.vertx.ext.unit.junit.Timeout)10 VertxUnitRunner (io.vertx.ext.unit.junit.VertxUnitRunner)10 PgConnection (io.vertx.pgclient.PgConnection)10 PgNotification (io.vertx.pgclient.PgNotification)10 PgPool (io.vertx.pgclient.PgPool)10 RowImpl (io.vertx.pgclient.impl.RowImpl)10 PrepareOptions (io.vertx.sqlclient.PrepareOptions)10