Skip to content

Dedicated Dev UI interface to execute (and "log"?) Hibernate ORM queries #39584

Closed

Description

@yrodiere

Description

When developing, It can be quite useful to:

  1. Execute queries manually and see their effect/results.
  2. See the history of executed by the app, and potentially re-execute them with some changes.

Currently, the only options to do so are:

  1. For execution, through a JDBC-level Dev UI -- which is a bit too low-level
  2. For query history, the logs.

I think a dedicated Dev UI interface could increase developer joy significantly, especially if we introduce additional features.

Initially it could be just about executing queries, like #43618. If we go that route we can move the query history + "extra" features to a follow-up issue.

A few "extra" features that come to mind (though we may not end up implementing all of them):

  • More user-friendly display: e.g. show SQL and bind parameter values next to each other, instead of in separate log lines
  • Easy export: "copy" buttons, e.g. raw SQL that can be executed directly on the DB.
  • Replay: re-run HQL/SQL requests, possibly after a manual edit, and display results
  • Context: show the stack trace that led to a particular query. Or maybe just rely on some OpenTelemetry tracing integration?
  • Timing: how long did a given query take?
  • Search: filter query history by datasource, sort by query time, ... Though that could require rather heavy infrastructure.

Implementation ideas

No response

Activity

  1. quarkus-bot commented on Mar 20, 2024

    @quarkus-bot

    /cc @cescoffier (devui), @phillip-kruger (devui)

  2. gsmet commented on Mar 20, 2024

    @gsmet
    Member

    That would indeed be awesome.

    If you can get the query time there too, I think it could have even more value.

  3. changed the title [-]Dedicated Dev UI interface to list Hibernate requests (ORM or Search)[/-] [+]Dedicated Dev UI interface to list Hibernate queries (ORM or Search)[/+] on Mar 20, 2024
  4. changed the title [-]Dedicated Dev UI interface to list Hibernate queries (ORM or Search)[/-] [+]Dedicated Dev UI interface to "log" executed Hibernate queries (ORM or Search)[/+] on Apr 29, 2024
  5. changed the title [-]Dedicated Dev UI interface to "log" executed Hibernate queries (ORM or Search)[/-] [+]Dedicated Dev UI interface to "log" (and replay/execute?) Hibernate queries (ORM or Search)[/+] on Oct 1, 2024
  6. yrodiere commented on Feb 7, 2025

    @yrodiere
    MemberAuthor

    See #43618 for the Agroal (SQL) implementation, which will likely be similar

  7. yrodiere commented on Mar 10, 2025

    @yrodiere
    MemberAuthor

    FWIW @mbladel is working on a first iteration that is more focused on executing queries, similar to #43618 but for Hibernate ORM. There won't be any logging or re-execution features, but we can add them later.

    @mbladel please comment here with a link to that PR when it's available -- even if it doesn't fix everything, it's worth tracking :)

  8. changed the title [-]Dedicated Dev UI interface to "log" (and replay/execute?) Hibernate queries (ORM or Search)[/-] [+]Dedicated Dev UI interface to execute (and "log"?) Hibernate ORM queries[/+] on Mar 10, 2025
  9. yrodiere commented on Mar 10, 2025

    @yrodiere
    MemberAuthor

    I rephrased the description to have a more realistic plan (MVP with execution only, logs/other features later), and to move the Hibernate Search part to #46693.

  10. added this to the 3.22 - main milestone on Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions