We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
orderBy()
In this kind of query:
import tink.sql.expr.Functions; return db.picture .leftJoin(db.vote).on(vote.pictureId == picture.id) .select({createdAt: picture.createdAt, id: picture.id, voteCount: Functions.count(vote.id)}) .groupBy(row -> [row.picture.id]) .orderBy(row -> [{field: row.voteCount, order: Desc}]) // Error: <type> has no field voteCount. .all(); .next(rows -> trace(rows.map(row -> row.voteCount)); // OK.
In the next() call, I can access the aggregated value (i.e. voteCount), but I can't use it in the orderBy() clause.
next()
voteCount
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In this kind of query:
In the
next()
call, I can access the aggregated value (i.e.voteCount
), but I can't use it in theorderBy()
clause.The text was updated successfully, but these errors were encountered: