Decorator to auto inject columns #675
Replies: 5 comments 1 reply
-
Nice one mate, pretty good. |
Beta Was this translation helpful? Give feedback.
-
🔬 |
Beta Was this translation helpful? Give feedback.
-
Yes, I like this. I'd like to add though that it would be nice to expand on this a bit and make it more than just base definitions. Allow decorators to be handled outside of the built in features. This enables us to make plugins like policies for postgres for example. This means instead of @decorator you'd use something else for base table info, like
Anything inside of athe decorator can just be passed in as arguments to whatever decorator handler registered it. So you'd get a pojo. Abstract would be a new primitive that allows for the same thing, but parses the contents as a definition. I also added rls as a table setting, because I think arbitrary settings should also be allowed and handled through plugins. |
Beta Was this translation helpful? Give feedback.
-
Hello, @RWOverdijk. Can you explain more detail about your syntax and what effect it should have from your example code snippet? Looking at the example, I'm still not sure what the difference is between @abstract(something) and @Policy{...}, and which settings/columns should be applied to table_1. Also, it would be very nice if you could demonstrate a specific use-case where your syntax will benefit DBML users. |
Beta Was this translation helpful? Give feedback.
-
Hi all, Thank you for the valuable inputs. To consolidate the feedback on DBML table reusability, we've posted a new proposal for a new syntax called You can find the details and continue the discussion here: #700 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Add the ability to define decorator (@DecoratorName) to specify default columns for auto inject, example:
If this is approved I would like to work on this 😊
Beta Was this translation helpful? Give feedback.
All reactions