Last updated 2 months ago
Filter and retrieve distinct values from the table based on the provided field, conditions, and options.
$field
keyof <StaticProps>
keyof
<StaticProps>
$where
$options
⇒
For example:
var values = await Member.$distinct({ $field: ['userId', 'username', 'displayName'], $where: { createdAt: { $gte: new Date('2021-01-01') } }, $options: { $cache: true } });
<FindOptions>