Opens a query console and executes the query.
Works for Hibernate, JPA, JDBC and MongoDB, and other persistence frameworks.