Replies: 2 comments 1 reply
-
Generally speaking its possible to express this query with diesel. It's hard to help you with details without knowing what you already tried or what exactly you understand as "having it all in a struct". You might want to add details to your question to elaborate on the following points:
|
Beta Was this translation helpful? Give feedback.
-
Totally, I'm hoping to get something like this from this type of table: I'd like to get a query that does something like this: In rust I'd want a struct like this:
So the code would be:
لِ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to write a query(postgres) that goes like
SELECT DATE_BIN('10 minutes',time,'2001-01-01'), SUM(field) FROM table GROUP BY DATE_BIN('10 minutes',time,'2001-01-01') ORDER BY DATE_BIN('10 minutes',time,'2001-01-01')
But I'm having a hard time finding examples of how I can define a struct to do that. I understand I can make a raw query, but it would be nice to have it all in a struct.
Beta Was this translation helpful? Give feedback.
All reactions