-
not sure how to ask this since I'm not a specialist on database things. I have the following:
as you can see, I defined a type with fields that represent when the thing was created, when it was updated and when it was (soft) deleted. Setting a default upon creation is kind of easy since we have Is this currently possible in some other way other than manually setting the new value on updates? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Currently, there isn't a schema-level way of implementing We are working on a general query rewrite system (see roadmap), which would allow arbitrary injection of operations into queries based on a condition (or unconditionally). Here's how (tentatively) your schema would look:
Or, in a more general audit log-style system:
We expect this (or some part of it) to land in 2.0. |
Beta Was this translation helpful? Give feedback.
-
Was this addressed? we are at version 4.0? or are you referring to something else when you mention |
Beta Was this translation helpful? Give feedback.
-
Thank you for the update, it wasn't clear from the issue above that it was - maybe it is a good idea to mark it at the title as [solved]? |
Beta Was this translation helpful? Give feedback.
Currently, there isn't a schema-level way of implementing
updated_at
like you've described, so you'll need to keep includingupdated_at := std::datetime_current()
in yourUPDATE
statements.We are working on a general query rewrite system (see roadmap), which would allow arbitrary injection of operations into queries based on a condition (or unconditionally). Here's how (tentatively) your schema would look:
Or, i…