Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

What's New In Eclipse JNoSQL 0.0.7

DZone's Guide to

What's New In Eclipse JNoSQL 0.0.7

Let's take a look at what's new in Eclipse JNoSQL 0.0.7 and explore how it improves queries in Cassandra with pagination state.

· Database Zone ·
Free Resource

Download "Why Your MySQL Needs Redis" and discover how to extend your current MySQL or relational database to a Redis database.

Eclipse JNoSQL is a Java framework that streamlines the integration of Java applications with NoSQL databases. It defines a set of APIs and provides a standard implementation for most NoSQL databases. This clearly helps to achieve very low coupling with the underlying NoSQL technologies used in applications. The version 0.0.7 comes with the hot query as text. This post will cover this release.

The newest Eclipse JNoSQL comes mostly with performance improvements and bug fixes. Furthermore, there are two highlights.

Improves Queries in Cassandra With Pagination State

The Cassandra PagingState represents the next page to be fetched if the query is multi-page. It can be saved and reused later on the same statement.

Thereby, Cassandra driver has a new class that is a specialization of DocumentQuery that might have a pagination state as String.

ColumnQuery query = select().from("entity").limit(6).build();
CassandraQuery cassandraQuery = CassandraQuery.of(query);
assertFalse(cassandraQuery.getPagingState().isPresent());
List<Person> entities = entityManager.select(cassandraQuery);
//it will return six entities and feed the paging state
assertTrue(cassandraQuery.getPagingState().isPresent());

Improving Integration Tests With Test Container

To improve the integration test at communication implementation with NoSQL database such as ArangoDB, this version gets an adoption of Test Container. Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

    private final GenericContainer arangodb =
            new GenericContainer("arangodb/arangodb:latest")
                    .withExposedPorts(8529)
                    .withEnv("ARANGO_NO_AUTH", "1")
                    .waitingFor(Wait.forHttp("/")
                            .forStatusCode(200));

    {
        arangodb.start();
    }

    @Override
    public ArangoDBDocumentCollectionManagerFactory get() {
        ArangoDBDocumentConfiguration configuration = new ArangoDBDocumentConfiguration();
        configuration.addHost(arangodb.getContainerIpAddress(), arangodb.getFirstMappedPort());
        return configuration.get();
    }

Jakarta EE and NoSQL

To the next version, we're working to move Eclipse JNoSQL under Jakarta EE specification; thereby, more community engagement will also be expected the package name might be changed to another sample such as "jakarta.nosql".

Read "Developing Apps Using Active-Active Redis Enterprise" and discover the advantages over other active-actve databases.

Topics:
nosql ,jnosql ,jakarta ,jakarta ee ,javaee ,java ,database ,cassandra ,pagingstate

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}