Opens a query file and executes the query.

Works for Hibernate, JPA, JDBC and MongoDB, and other persistence frameworks.