We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ae885d commit 9b4635eCopy full SHA for 9b4635e
src/runtime/internal/query.ts
@@ -98,7 +98,8 @@ export const collectionQureyBuilder = <T extends keyof Collections>(collection:
98
query += `COUNT(${opts.count.distinct ? 'DISTINCT' : ''} ${opts.count.field}) as count`
99
}
100
else {
101
- query += params.selectedFields.length > 0 ? params.selectedFields.map(f => `"${String(f)}"`).join(', ') : '*'
+ const fields = Array.from(new Set(params.selectedFields))
102
+ query += fields.length > 0 ? fields.map(f => `"${String(f)}"`).join(', ') : '*'
103
104
query += ` FROM ${tables[String(collection)]}`
105
0 commit comments