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
SELECT DISTINCT
Currently, there doesn't seem to be a way to select only distinct records from a database.
I believe this should be reasonably easy to implement by simply adding a distinct() static method to Model, which would lead to the following api:
distinct()
Model
const flightDestinations = Flight .select('destination') .distinct() .get();
Which would generate the SQL query:
SELECT DISTINCT destination FROM flights;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently, there doesn't seem to be a way to select only distinct records from a database.
I believe this should be reasonably easy to implement by simply adding a
distinct()
static method toModel
, which would lead to the following api:Which would generate the SQL query:
The text was updated successfully, but these errors were encountered: