Class SQLExtractor

java.lang.Object
io.hypersistence.utils.hibernate.query.SQLExtractor

public class SQLExtractor extends Object
The SQLExtractor allows you to extract the underlying SQL query generated by a JPQL or JPA Criteria API query.

For more details about how to use it, check out this article on vladmihalcea.com.

Since:
2.9.11
Author:
Vlad Mihalcea
  • Constructor Details

    • SQLExtractor

      protected SQLExtractor()
  • Method Details

    • from

      public static String from(jakarta.persistence.Query query)
      Get the underlying SQL generated by the provided JPA query.
      Parameters:
      query - JPA query
      Returns:
      the underlying SQL generated by the provided JPA query