Issue using datetime_add
Hello, thanks again for the awesome library, I was trying to get into some more useful functionalities of Ash (calculations, etc.) and I'm mostly having a good time learning about it but there was one bit that I was having a hard time with. I was modeling an appointment, which I wanted to store the start date and the duration of. I thought calculating the end time would be useful, so I added made the following resource:
If I attempt to load the calculation, I get an error:
This is the SQL that is generated:
If I tweak it to include parentheses around the timestamp calculation, it works:
Is there something I'm doing incorrectly in defining the calculation?
Thanks!
3 Replies
Hm…this might be a bug in ash postgres 🙂
I'll take a look in a few hours when I'm home
Can you try ash_postgres main branch?
Just had a chance to check it out and it generated SQL that Postgres likes:
Thanks so much for checking into it!
👍 my pleasure, thanks for the report!