Search in sources :

Example 6 with ResultInfo

use of org.folio.rest.jaxrs.model.ResultInfo in project raml-module-builder by folio-org.

the class PostgresClientIT method streamGetWithFacetsAndFilter.

@Test
public void streamGetWithFacetsAndFilter(TestContext context) {
    AtomicInteger objectCount = new AtomicInteger();
    Async async = context.async();
    List<FacetField> facets = new ArrayList<FacetField>();
    facets.add(new FacetField("jsonb->>'edition'"));
    facets.add(new FacetField("jsonb->>'title'"));
    createTableWithPoLines(context);
    postgresClient.streamGet(MOCK_POLINES_TABLE, Poline.class, "jsonb", firstEdition(), true, null, facets, QUERY_TIMEOUT, context.asyncAssertSuccess(sr -> {
        ResultInfo resultInfo = sr.resultInfo();
        context.assertEquals(3, resultInfo.getTotalRecords());
        context.assertEquals(2, resultInfo.getFacets().size());
        context.assertEquals("edition", resultInfo.getFacets().get(0).getType());
        context.assertEquals(1, resultInfo.getFacets().get(0).getFacetValues().size());
        context.assertEquals("First edition", resultInfo.getFacets().get(0).getFacetValues().get(0).getValue());
        context.assertEquals(3, resultInfo.getFacets().get(0).getFacetValues().get(0).getCount());
        context.assertEquals("title", resultInfo.getFacets().get(1).getType());
        context.assertEquals(3, resultInfo.getFacets().get(1).getFacetValues().size());
        context.assertEquals(1, resultInfo.getFacets().get(1).getFacetValues().get(0).getCount());
        context.assertEquals(1, resultInfo.getFacets().get(1).getFacetValues().get(1).getCount());
        context.assertEquals(1, resultInfo.getFacets().get(1).getFacetValues().get(2).getCount());
        sr.handler(streamHandler -> objectCount.incrementAndGet());
        sr.endHandler(x -> {
            context.assertEquals(3, objectCount.get());
            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) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Async(io.vertx.ext.unit.Async) ArrayList(java.util.ArrayList) FacetField(org.folio.rest.persist.facets.FacetField) ResultInfo(org.folio.rest.jaxrs.model.ResultInfo) Test(org.junit.Test)

Example 7 with ResultInfo

use of org.folio.rest.jaxrs.model.ResultInfo in project raml-module-builder by folio-org.

the class PostgresClientIT method getDistinctOnWithFacets.

@Test
public void getDistinctOnWithFacets(TestContext context) {
    final String tableDefiniton = "id UUID PRIMARY KEY , jsonb JSONB NOT NULL, distinct_test_field TEXT";
    createTableWithPoLines(context, MOCK_POLINES_TABLE, tableDefiniton);
    List<FacetField> facets = List.of(new FacetField("jsonb->>'edition'"));
    String distinctOn = "jsonb->>'order_format'";
    // with facets and return count
    Async async1 = context.async();
    CQLWrapper wrapper = new CQLWrapper();
    postgresClient.get(MOCK_POLINES_TABLE, Poline.class, new String[] { "*" }, wrapper, true, false, facets, distinctOn, handler -> {
        ResultInfo resultInfo = handler.result().getResultInfo();
        context.assertEquals(4, resultInfo.getTotalRecords());
        List<Facet> retFacets = resultInfo.getFacets();
        context.assertEquals(1, retFacets.size());
        async1.complete();
    });
    async1.awaitSuccess();
}
Also used : Async(io.vertx.ext.unit.Async) FacetField(org.folio.rest.persist.facets.FacetField) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) ResultInfo(org.folio.rest.jaxrs.model.ResultInfo) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper) Facet(org.folio.rest.jaxrs.model.Facet) Test(org.junit.Test)

Example 8 with ResultInfo

use of org.folio.rest.jaxrs.model.ResultInfo in project raml-module-builder by folio-org.

the class PostgresClientIT method streamGetWithFacetsZeroHits.

@Test
public void streamGetWithFacetsZeroHits(TestContext context) throws FieldException {
    AtomicInteger objectCount = new AtomicInteger();
    Async async = context.async();
    List<FacetField> facets = new ArrayList<FacetField>();
    facets.add(new FacetField("jsonb->>'edition'"));
    facets.add(new FacetField("jsonb->>'title'"));
    createTableWithPoLines(context);
    CQLWrapper wrapper = new CQLWrapper(new CQL2PgJSON("jsonb"), "edition=Millenium edition");
    postgresClient.streamGet(MOCK_POLINES_TABLE, Object.class, "jsonb", wrapper, true, null, facets, context.asyncAssertSuccess(sr -> {
        ResultInfo resultInfo = sr.resultInfo();
        context.assertEquals(0, resultInfo.getTotalRecords());
        context.assertEquals(0, resultInfo.getFacets().size());
        sr.handler(streamHandler -> objectCount.incrementAndGet());
        sr.endHandler(x -> {
            context.assertEquals(0, objectCount.get());
            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) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Async(io.vertx.ext.unit.Async) ArrayList(java.util.ArrayList) FacetField(org.folio.rest.persist.facets.FacetField) ResultInfo(org.folio.rest.jaxrs.model.ResultInfo) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper) Test(org.junit.Test)

Example 9 with ResultInfo

use of org.folio.rest.jaxrs.model.ResultInfo in project raml-module-builder by folio-org.

the class PostgresClientIT method normalGetWithFacetsAndFilter.

@Test
public void normalGetWithFacetsAndFilter(TestContext context) {
    List<FacetField> facets = new ArrayList<FacetField>();
    facets.add(new FacetField("jsonb->>'edition'"));
    facets.add(new FacetField("jsonb->>'title'"));
    createTableWithPoLines(context);
    postgresClient.get(MOCK_POLINES_TABLE, Poline.class, new String[] { "jsonb" }, firstEdition(), true, true, facets, context.asyncAssertSuccess(sr -> {
        ResultInfo resultInfo = sr.getResultInfo();
        context.assertEquals(3, resultInfo.getTotalRecords());
        context.assertEquals(2, resultInfo.getFacets().size());
        context.assertEquals("edition", resultInfo.getFacets().get(0).getType());
        context.assertEquals(1, resultInfo.getFacets().get(0).getFacetValues().size());
        context.assertEquals("First edition", resultInfo.getFacets().get(0).getFacetValues().get(0).getValue());
        context.assertEquals(3, resultInfo.getFacets().get(0).getFacetValues().get(0).getCount());
        context.assertEquals("title", resultInfo.getFacets().get(1).getType());
        context.assertEquals(3, resultInfo.getFacets().get(1).getFacetValues().size());
        context.assertEquals(1, resultInfo.getFacets().get(1).getFacetValues().get(0).getCount());
        context.assertEquals(1, resultInfo.getFacets().get(1).getFacetValues().get(1).getCount());
        context.assertEquals(1, resultInfo.getFacets().get(1).getFacetValues().get(2).getCount());
    }));
}
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) ArrayList(java.util.ArrayList) FacetField(org.folio.rest.persist.facets.FacetField) ResultInfo(org.folio.rest.jaxrs.model.ResultInfo) Test(org.junit.Test)

Example 10 with ResultInfo

use of org.folio.rest.jaxrs.model.ResultInfo in project raml-module-builder by folio-org.

the class PostgresClient method doStreamGetCount.

/**
 * private for now, might be public later (and renamed)
 * @param <T>
 * @param connection
 * @param table
 * @param clazz
 * @param fieldName
 * @param wrapper
 * @param returnIdField
 * @param distinctOn
 * @param facets
 * @param replyHandler
 */
// Method has >7 parameters
@SuppressWarnings({ "squid:S00107" })
<T> void doStreamGetCount(PgConnection connection, boolean startTransaction, String table, Class<T> clazz, String fieldName, CQLWrapper wrapper, boolean returnIdField, String distinctOn, List<FacetField> facets, Handler<AsyncResult<PostgresClientStreamResult<T>>> replyHandler) {
    try {
        QueryHelper queryHelper = buildQueryHelper(table, fieldName, wrapper, returnIdField, facets, distinctOn);
        Future<Integer> countQuery;
        if (wrapper == null || wrapper.hasReturnCount()) {
            countQuery = connection.query(queryHelper.countQuery).execute().map(result -> result.iterator().next().getInteger(0));
        } else {
            countQuery = Future.succeededFuture(null);
        }
        countQuery.onSuccess(count -> {
            ResultInfo resultInfo = new ResultInfo();
            resultInfo.setTotalRecords(count);
            doStreamGetQuery(connection, startTransaction, queryHelper, resultInfo, clazz, replyHandler);
        }).onFailure(e -> {
            log.error(e.getMessage(), e);
            replyHandler.handle(Future.failedFuture(e));
        });
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        replyHandler.handle(Future.failedFuture(e));
    }
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) RowStream(io.vertx.sqlclient.RowStream) Arrays(java.util.Arrays) AES(org.folio.rest.security.AES) Tuple(io.vertx.sqlclient.Tuple) UpdateSection(org.folio.rest.persist.Criteria.UpdateSection) MetadataUtil(org.folio.rest.tools.utils.MetadataUtil) OpenSSLEngineOptions(io.vertx.core.net.OpenSSLEngineOptions) RowIterator(io.vertx.sqlclient.RowIterator) Matcher(java.util.regex.Matcher) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ObjectMapperTool(org.folio.dbschema.ObjectMapperTool) Map(java.util.Map) JsonObject(io.vertx.core.json.JsonObject) Transaction(io.vertx.sqlclient.Transaction) Method(java.lang.reflect.Method) JdkSSLEngineOptions(io.vertx.core.net.JdkSSLEngineOptions) FacetManager(org.folio.rest.persist.facets.FacetManager) UUID(java.util.UUID) Future(io.vertx.core.Future) PoolOptions(io.vertx.sqlclient.PoolOptions) InvocationTargetException(java.lang.reflect.InvocationTargetException) List(java.util.List) Logger(org.apache.logging.log4j.Logger) Criterion(org.folio.rest.persist.Criteria.Criterion) Results(org.folio.rest.persist.interfaces.Results) Buffer(io.vertx.core.buffer.Buffer) Pattern(java.util.regex.Pattern) SecretKey(javax.crypto.SecretKey) CQLWrapper(org.folio.rest.persist.cql.CQLWrapper) FacetField(org.folio.rest.persist.facets.FacetField) TemplateException(freemarker.template.TemplateException) HashMap(java.util.HashMap) ResultInfo(org.folio.rest.jaxrs.model.ResultInfo) Function(java.util.function.Function) PreparedStatement(io.vertx.sqlclient.PreparedStatement) ArrayList(java.util.ArrayList) SqlConnection(io.vertx.sqlclient.SqlConnection) RowSet(io.vertx.sqlclient.RowSet) AsyncResult(io.vertx.core.AsyncResult) PemTrustOptions(io.vertx.core.net.PemTrustOptions) LinkedList(java.util.LinkedList) PostgresTester(org.folio.util.PostgresTester) OpenSsl(io.netty.handler.ssl.OpenSsl) Iterator(java.util.Iterator) Envs(org.folio.rest.tools.utils.Envs) 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) HashedMap(org.apache.commons.collections4.map.HashedMap) MultiKeyMap(org.apache.commons.collections4.map.MultiKeyMap) TimeUnit(java.util.concurrent.TimeUnit) JsonArray(io.vertx.core.json.JsonArray) PgConnection(io.vertx.pgclient.PgConnection) Row(io.vertx.sqlclient.Row) PgConnectOptions(io.vertx.pgclient.PgConnectOptions) Option(java.lang.StackWalker.Option) Handler(io.vertx.core.Handler) Collections(java.util.Collections) LogManager(org.apache.logging.log4j.LogManager) SslMode(io.vertx.pgclient.SslMode) ResultInfo(org.folio.rest.jaxrs.model.ResultInfo) InvocationTargetException(java.lang.reflect.InvocationTargetException) TemplateException(freemarker.template.TemplateException) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException)

Aggregations

ResultInfo (org.folio.rest.jaxrs.model.ResultInfo)12 Results (org.folio.rest.persist.interfaces.Results)11 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)10 JsonObject (io.vertx.core.json.JsonObject)10 IOException (java.io.IOException)10 ArrayList (java.util.ArrayList)10 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)9 AsyncResult (io.vertx.core.AsyncResult)9 Future (io.vertx.core.Future)9 Handler (io.vertx.core.Handler)9 Promise (io.vertx.core.Promise)9 Vertx (io.vertx.core.Vertx)9 JsonArray (io.vertx.core.json.JsonArray)9 PgConnection (io.vertx.pgclient.PgConnection)9 PgPool (io.vertx.pgclient.PgPool)9 PreparedStatement (io.vertx.sqlclient.PreparedStatement)9 Row (io.vertx.sqlclient.Row)9 RowIterator (io.vertx.sqlclient.RowIterator)9 RowSet (io.vertx.sqlclient.RowSet)9 RowStream (io.vertx.sqlclient.RowStream)9