Releases: JtdeGraaf/JPQL2SQL
Releases · JtdeGraaf/JPQL2SQL
Release list
1.4.1
Added
- SpEL (Spring Expression Language) parameter support:
:#{#paramName},?#{[0]},#{#entityName}
Fixed
- Arithmetic expressions with aggregates now parse correctly (e.g.,
SUM(x) * 2,price * COUNT(items)) - FK optimization now works for any
@Idfield, not just fields named "id" (e.g.,u.department.userIduses FK directly) - JOIN conditions now use actual PK column names from
@Id/@Columnannotations instead of hardcoded "id"
1.4.0
1.4.0
Changed
- Refactored parser architecture: extracted specialized expression parsers (FunctionExpressionParser, AggregateExpressionParser, SubqueryExpressionParser, ComparisonExpressionParser) from monolithic ExpressionParser
- Added reusable parsing helpers to ParseContextExtensions:
parseInParentheses(),tryParseJoinType(),parseOrderDirection(),parseNullsOrdering() - Grouped token types in TokenType enum for better organization (clause keywords, expression starters, comparison operators, etc.)
- Consolidated derived query prefix matching into unified lookup with
ALL_PREFIXESmap - Encapsulated JOIN state management in DerivedQueryAstBuilder with dedicated
BuilderStateclass - Refactored condition operator handling with grouped patterns and reusable literal constants
1.3.0
Added
@IdClassannotation support for composite primary keys- Hibernate
@Subselectannotation support for mapping entities to SQL subqueries UNION,UNION ALL,INTERSECT,INTERSECT ALL,EXCEPT,EXCEPT ALLset operations@Inheritanceand@DiscriminatorColumnsupport for SINGLE_TABLE inheritance strategyTYPE(alias)expression support for polymorphic queries (e.g.,WHERE TYPE(e) = Manager)@AttributeConvertersupport with automatic literal value conversion (e.g., Boolean to 'Y'/'N' or 1/0)- Subclass entities using SINGLE_TABLE inheritance automatically resolve to the parent's table
- Collection-valued parameters support (
IN :collectionParamwithout parentheses)
1.2.0
Added
- Support for Spring Data JPA derived query methods (
findByName,findByAgeGreaterThan,countByStatus, etc.) - Implicit JOIN generation for relationship traversals in
@QueryJPQL (e.g.,u.department.nameautomatically generatesLEFT JOIN departments) - FK optimization: accessing
.idon@ManyToOne/@OneToOnerelationships uses the FK column directly without generating a JOIN - Support for String Concatenation || Operator
- Support for EXTRACT(field FROM date) Function
- Support for Enhanced TRIM Syntax
- Support for FULL OUTER JOIN and CROSS JOIN
1.1.0
1.1.0
Added
- SQL output is now automatically formatted using IntelliJ's SQL formatter
- Support for
CAST(expression AS type)expressions with automatic JPQL to SQL type mapping (String→VARCHAR, Integer→INTEGER, Long→BIGINT, etc.) - Support for parameterless native function calls like
SYSDATE()(Hibernate-compatible syntax) - Oracle dialect:
SYSDATE,SYSTIMESTAMP,USERetc. rendered without parentheses - Support for
FETCH FIRST n ROWS ONLYandOFFSET m ROWS FETCH FIRST n ROWS ONLYsyntax
Changed
- Resilient parsing: unparsed/unsupported syntax is now captured as SQL comments (
/* UNPARSED: ... */) instead of throwing exceptions
1.0.3
1.0.3
Changed
- Removed useless parenthesis that got added around conditions
1.0.2
1.0.2
Added
- Support for JPQL
FUNCTION('native_name', args...)syntax to call native database functions - Support for
EXISTSandNOT EXISTSexpressions
Fixed
- Fixed subquery parsing not terminating correctly at closing parenthesis
1.0.1
1.0.1
Fixed
- Resolved issue with
@OneToManyrelationships not generating correct JOINs in certain edge cases
Changed
- Refactored internal tests to make it easier to add new testcases for complex JPQL queries
1.0.0
1.0.0
Added
- Convert JPQL
@Queryannotations to native SQL with one click (Copy as Native Query) - JPA annotation-aware column resolution:
@Table,@Column,@JoinColumn,@Embedded,@EmbeddedId,@AttributeOverride,@JoinTable - Multi-dialect support: PostgreSQL, MySQL, Oracle, SQL Server, H2
- Full JPQL clause coverage: SELECT, JOIN, WHERE, GROUP BY, HAVING, ORDER BY, subqueries, CASE, aggregates, BETWEEN, IN, LIKE, IS NULL
- Constructor expression support (
SELECT NEW ...) - Named (
:param) and positional (?1) parameter preservation - Configurable SQL dialect under Settings > Tools > JPQL to SQL