$ show perplexhub/rsql-jpa-specification
rsql-jpa-specification is a library that translates RSQL (RESTful Search Query Language) queries into Spring Data JPA Specifications or QueryDSL Predicates. It supports complex queries including entity associations, JSONB fields (PostgreSQL), custom operators, property mapping, and sorting. The architecture consists of core parsing utilities (rsql-common), JPA-specific implementations (rsql-jpa), QueryDSL implementations (rsql-querydsl), and Spring Boot starters for easy integration. The library uses the visitor pattern for RSQL parsing and CriteriaBuilder/QueryDSL APIs to construct specifications and predicates.
The LLM identified 3 files worth highlighting for reuse:
Handles property path mapping with intelligent beginning/whole path matching using Optional chaining. Demonstrates clean utility design that could be extracted for any object-property mapping scenario with minimal dependencies (only Spring utils and Java standard library).
Encapsulates smart JOIN creation logic for JPA Criteria API with join reuse through caching. Prioritizes checking existing fetches before creating new joins, demonstrating performance-aware design that could be reused in any JPA Criteria API project.
Parses complex sort strings into JPA Order objects with support for JSONB properties, property mapping, and case-insensitive sorting. Shows clean separation of parsing logic from JPA integration, making it reusable in any JPA-based sorting scenario.