final JdbcDataContext dataContext = new JdbcDataContext(ds,
new TableType[] { TableType.TABLE, TableType.VIEW }, null);
final JdbcCompiledQuery compiledQuery = (JdbcCompiledQuery) dataContext.query().from("CUSTOMERS")
.select("CUSTOMERNAME").where("CUSTOMERNUMBER").eq(new QueryParameter()).compile();
assertEquals(0, compiledQuery.getActiveLeases());
assertEquals(0, compiledQuery.getIdleLeases());
final String compliedQueryString = compiledQuery.toSql();