Calculate math with addition, submission or calculated field #3520
-
Description of issueI was wondering what the best way of creating a query like:
If I understood correctly, there is currently no way to execute the above query using postgREST? I did not find a similar issue to this yet :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The calculation you are doing looks like you don't need dynamic calculations. I fact you are trying to represent a value stored in the database as Kelvin as a value in Celsius on the api level, right? (Or maybe the other way around, but the idea is the same) This looks like a clear-cut case of domain representations. The big advantage: You can also hardcode the other way back, when updating the column. |
Beta Was this translation helpful? Give feedback.
The calculation you are doing looks like you don't need dynamic calculations. I fact you are trying to represent a value stored in the database as Kelvin as a value in Celsius on the api level, right? (Or maybe the other way around, but the idea is the same)
This looks like a clear-cut case of domain representations. The big advantage: You can also hardcode the other way back, when updating the column.