Quarkus Qubit

Type-safe, lambda-based queries on Panache entities with build-time transformation to JPA Criteria Queries.

What is Qubit?

Qubit analyzes lambda expressions at build time and transforms them into JPA Criteria Queries. This approach combines the readability of streams with the performance of pre-compiled queries.

List<Person> adults = personRepository
    .where((Person p) -> p.age >= 18 && p.active)
    .sortedBy((Person p) -> p.lastName)
    .toList();

Key Features

  • Type-safe: Full IDE support with compile-time verification

  • Zero overhead: Queries are pre-compiled, not interpreted at runtime

  • Fluent API: JINQ-inspired method chaining for readable queries

Capabilities

Feature Description

Query Operations

Filtering, sorting, pagination, and projections

Join Queries

Inner and left joins with access to both entities

Grouping & Aggregations

GROUP BY with HAVING clauses and aggregate functions

Subqueries

EXISTS, IN, and scalar comparisons with subqueries

Configuration

Scanning, code generation, and logging options

Installation

Add the dependency to your project:

<dependency>
    <groupId>io.quarkiverse.qubit</groupId>
    <artifactId>quarkus-qubit</artifactId>
    <version>${quarkus-qubit.version}</version>
</dependency>

Requirements

  • Java 25+

  • Quarkus 3.31+

  • Hibernate ORM with Panache

  • GraalVM 25+ (optional, for native compilation)

Where to Go Next