-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix/case sensitive mutability #206
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
I had noticed a MutabilityType
enumeration:
kwil-db/pkg/transactions/payloads.go
Lines 160 to 163 in 6dbd808
const ( | |
MutabilityUpdate MutabilityType = "update" | |
MutabilityView MutabilityType = "view" | |
) |
Do those values or that type not apply here?
Yep, the client sends across a string though (gRPC doesn't restrict values that are not valid enums if they are of the correct underlying type), so we have to manually do the conversion. The bug was where this manual conversion occurs. |
I see, gRPC would unmarshal even invalid values. I guess my question is, what had you planned for kwil-db/pkg/transactions/payloads_test.go Lines 60 to 64 in a3c253e
I got here because I went looking for |
Hmm, I think that must've been something that was lost in translation. Looking at it more, it does not seem like we need it. |
In the engine package, I use enums a lot. |
* fixed bug where mutability was checked case sensitively * unincluded changes from other branch
* fixed bug where mutability was checked case sensitively * unincluded changes from other branch
* fixed bug where mutability was checked case sensitively * unincluded changes from other branch
* fixed bug where mutability was checked case sensitively * unincluded changes from other branch
* fixed bug where mutability was checked case sensitively * unincluded changes from other branch
* fixed bug where mutability was checked case sensitively * unincluded changes from other branch
Fixed a basic bug where incoming schemas can fail due to having the wrong mutability case