A hook triggered before a distinct query operation.
The beforeDistinct()
hook is triggered when the distinct()
method is called. It allows you to modify the WixDataDistinct
object before the distinct query runs.
Return a WixDataDistinct
object or a Promise that resolves to a WixDataDistinct
object. The returned object defines the distinct query that runs instead of the original distinct query created by the distinct()
method.
If the returned value is of the wrong type, the value is ignored.
A rejected Promise blocks the call to distinct()
and triggers the onFailure()
hook, if it has been registered.
Original WixDataDistinct
object.
Contextual information about the hook.