Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Fetch Distinct Records from the database #52

Open
segunadeleye opened this issue Oct 6, 2015 · 0 comments
Open

Fetch Distinct Records from the database #52

segunadeleye opened this issue Oct 6, 2015 · 0 comments

Comments

@segunadeleye
Copy link
Contributor

Is it possible to get distinct values from the database using fuzilly.

SearchCategory.distinct(:name).find_by_fuzzy_name(term, limit: limit)
gives
SELECT DISTINCT businesses.* FROM businesses WHERE businesses.deleted_at IS NULL AND businesses.id IN (1, 2, 3, 10, 9)
and I want
SELECT DISTINCT businesses.name FROM businesses WHERE businesses.deleted_at IS NULL AND businesses.id IN (1, 2, 3, 10, 9)

Please help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant