Implicit Timestamps #182
Closed
pschuette22
started this conversation in
Ideas
Replies: 1 comment
-
Oops, moving this to structured queries 😅 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First off, thank you for the great work. iOS Development is more clear, stable, and maintainable using Pointfree libraries.
One of the things I added recently was implicit timestamps for table models using database triggers. The implementation we have is somewhat manual and I wonder if there's an appetite to try to work this into the Table macro (if it's not already there?) by default.
Here's the gist of what I have:
Simple protocol just enforces the existence of the created and updated columns
Note: these are internal because of how our app is modularized
While this is all fine and dandy, I wonder if this is interesting enough to work into the table macro? As a relative novice to swift macro writing, would it be possible to aggregate the boilerplate from above into the table macro, something like:
Are there other solutions to this I have not considered or didn't see? Are there any caveats to this that complicate it? I have done a lot of iOS development, but not too much Swift macro, so I'd love a trained eye here.
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions