Skip to content

Consider converters for OptionalInt, OptionalLong, and OptionalDouble #472

Open
@mp911de

Description

@mp911de

Since primitive null values are not emitted as query result (see #469), we should consider adding support for optional primitive projections such as OptionalInt. These types allow reasoning about the target type and their value may be absent while still emitting a result object. This may be required when the result order matters.

interface MyRepository extends ReactiveCrudRepository<MyEntity, Integer> {

    @Query("SELECT age FROM my_table ORDER BY first_name")
    Flux<OptionalInt> findMaxAge();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions