Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Deserialization API rework #665
Deserialization API rework #665
Changes from 1 commit
2f57a6d
1dfaf83
c9f6d47
10eceb3
b71eabf
0585656
c6e0876
36bf20c
76cfc29
ef6d00d
7221db6
8a7233e
f145a07
8243277
a62c909
ecb041c
9d0b645
b894ae0
6aa9a47
26be1cd
20f81e1
fb6be07
1edb236
bf66b03
0a5ad84
201950d
cb18f5d
8e321af
fea6c7b
46317ea
54fd357
1a67b5c
46b6e4d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make it work with
enforce_order
?I imagine that people who use
enforce_order
for the extra performance boost might need to use it too.AFAIU the main use of
default_when_missing
is gracefully handling theADD FIELD
operation on UDTs.When someone wants to add the field while the app is running they should:
default_when_missing
ADD FIELD
operation in the databaseIn such situation it's crucial to be able to use
default_when_missing
. We shouldn't penalize people who use straight order enforcing by making it impossible for them to handle such changes gracefully.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also if this combination isn't supported I think trying to do both of them at once should generate a compilation error instead of silently ignoring
default_when_missing
. Ignoring it might lead to some nasty surprises for the users.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, we can support
enforce_order + default_when_missing
. If a struct field doesn't match the column name, we will initialize that field toDefault::default()
and will try to initialize the next field with that column.