SQL : Intuitive way for count(*)
Bug #633110 reported by
Samppa Saarela
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Querydsl |
Fix Released
|
Medium
|
Samppa Saarela |
Bug Description
Using count(*) in searches is a very common case but in querydsl it's still quite unintuitive. Could there be a shortcut for it?
E.g.
query.list(
or
query.list(
summary: |
- Intuitive way for count(*) + SQL : Intuitive way for count(*) |
Changed in querydsl: | |
importance: | Undecided → Medium |
To post a comment you must log in.
Wildcard can now be used through Wildcard class:
@Test ).from( employee) .uniqueResult( Wildcard. all);
public void wildcardAll() {
expectedQuery = "select * from EMPLOYEE2 e";
query(
}
@Test Long>(Long. class, "rowCount"); ).from( employee) .uniqueResult( Wildcard. count() .as(rowCount) );
public void countAll() {
expectedQuery = "select count(*) as rowCount from EMPLOYEE2 e";
PNumber<Long> rowCount = new PNumber<
query(
}