-
Notifications
You must be signed in to change notification settings - Fork 664
rust: default macro
#3177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust: default macro
#3177
Conversation
a792b32 to
608efaf
Compare
|
Thanks, I will hold this PR to merge until we merge the other PR to make this functional. |
|
How to use these default values? Do we pass some sentinel value (as |
@egormanga These will be used with an upcoming feature that allows adding columns during "supervised" automigrations. |
|
It would be great if those defaults were applied to missing columns when inserting via SQL. I'd love to see an issue on this. |
Description of Changes
PR introduces support for column-level default values via a new
#[default(...)]attribute.It also validates,
defaultmacro is not used along withprimary_key,uniqueorauto_inc.API and ABI breaking changes
NA
Expected complexity level and risk
2
Testing
Start using macro in
module-test.