Skip to content

Releases: JtdeGraaf/JPQL2SQL

1.4.1

Choose a tag to compare

@github-actions github-actions released this 12 Mar 07:32

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 @Id field, not just fields named "id" (e.g., u.department.userId uses FK directly)
  • JOIN conditions now use actual PK column names from @Id/@Column annotations instead of hardcoded "id"

1.4.0

Choose a tag to compare

@github-actions github-actions released this 10 Mar 21:34

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_PREFIXES map
  • Encapsulated JOIN state management in DerivedQueryAstBuilder with dedicated BuilderState class
  • Refactored condition operator handling with grouped patterns and reusable literal constants

1.3.0

Choose a tag to compare

@github-actions github-actions released this 06 Mar 22:49

Added

  • @IdClass annotation support for composite primary keys
  • Hibernate @Subselect annotation support for mapping entities to SQL subqueries
  • UNION, UNION ALL, INTERSECT, INTERSECT ALL, EXCEPT, EXCEPT ALL set operations
  • @Inheritance and @DiscriminatorColumn support for SINGLE_TABLE inheritance strategy
  • TYPE(alias) expression support for polymorphic queries (e.g., WHERE TYPE(e) = Manager)
  • @AttributeConverter support 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 :collectionParam without parentheses)

1.2.0

Choose a tag to compare

@github-actions github-actions released this 06 Mar 09:57

Added

  • Support for Spring Data JPA derived query methods (findByName, findByAgeGreaterThan, countByStatus, etc.)
  • Implicit JOIN generation for relationship traversals in @Query JPQL (e.g., u.department.name automatically generates LEFT JOIN departments)
  • FK optimization: accessing .id on @ManyToOne/@OneToOne relationships 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

Choose a tag to compare

@github-actions github-actions released this 03 Mar 21:31

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, USER etc. rendered without parentheses
  • Support for FETCH FIRST n ROWS ONLY and OFFSET m ROWS FETCH FIRST n ROWS ONLY syntax

Changed

  • Resilient parsing: unparsed/unsupported syntax is now captured as SQL comments (/* UNPARSED: ... */) instead of throwing exceptions

1.0.3

Choose a tag to compare

@github-actions github-actions released this 02 Mar 23:07

1.0.3

Changed

  • Removed useless parenthesis that got added around conditions

1.0.2

Choose a tag to compare

@github-actions github-actions released this 02 Mar 19:40

1.0.2

Added

  • Support for JPQL FUNCTION('native_name', args...) syntax to call native database functions
  • Support for EXISTS and NOT EXISTS expressions

Fixed

  • Fixed subquery parsing not terminating correctly at closing parenthesis

1.0.1

Choose a tag to compare

@github-actions github-actions released this 02 Mar 09:20

1.0.1

Fixed

  • Resolved issue with @OneToMany relationships 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

Choose a tag to compare

@github-actions github-actions released this 01 Mar 19:43

1.0.0

Added

  • Convert JPQL @Query annotations 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