New issue

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

Order by a calculated value. #1908

Open
sbwtw opened this Issue Nov 7, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@sbwtw

sbwtw commented Nov 7, 2018

I want select some items order by the relative timestamp, the sql like this:
select title, time from articles order by ABS(time - TIMESTAMP('2018-01-01')) asc limit 10;
it's works in mysql but I don't know how to do in diesel (without hard code raw sql).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment