Find file
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (66 sloc) 2.18 KB

Querydsl SQL

The SQL module provides integration with the JDBC API.

Maven integration

Add the following dependencies to your Maven project :


Code generation via Maven

This functionality is also available as a Maven plugin. The presented example can be declared like this in the POM :


Use the goal test-export to add the targetFolder as a test compile source root instead of a compile source root.


Querying with Querydsl SQL is as simple as this :

QCustomer customer = new QCustomer("c");

SQLTemplates dialect = new HSQLDBTemplates(); // SQL-dialect
SQLQuery<?> query = new SQLQuery<Void>(connection, dialect);
List<String> lastNames =

For more information on the Querydsl SQL module visit the reference documentation