-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: Add support for lwwr scalar arrays (full replace on update) #115
Conversation
316b30f
to
53fd7a1
Compare
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.
Nice solid implementation to get scalar arrays up and going.
Some minor issues on the type conversion stuff, and a general concern for the "smell of the code" for that one validateFieldSchema
stuff, but we can prob Look at that section in a different PR and come up with a better long term approach
53fd7a1
to
7e194c9
Compare
Codecov Report
@@ Coverage Diff @@
## develop #115 +/- ##
===========================================
- Coverage 54.03% 52.47% -1.56%
===========================================
Files 35 35
Lines 3633 3741 +108
===========================================
Hits 1963 1963
- Misses 1441 1547 +106
- Partials 229 231 +2
|
7e194c9
to
1d77d91
Compare
validateFieldSchema issue: #124 |
1d77d91
to
7f8abd4
Compare
7f8abd4
to
2e5975c
Compare
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.
All the preview changes look good. Added another comment to investigate, but other than that, all good.
Ping me once that last bit is checked on and ill give the finally approval!
@@ -297,6 +297,10 @@ func (doc *Document) setObject(t core.CType, field string, val *Document) error | |||
} | |||
|
|||
func (doc *Document) setAndParseType(field string, value interface{}) error { | |||
if value == nil { | |||
return nil |
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 think on further review it might actually need to be a nil value set on the doc.setCBOR
field. Can you investigate further?
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 thought so on read of your original comment, but I tested without the setCBOR
field (int. test covers this) and all was good.
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.
Everything resolved! LGTM
…urcenetwork#115) * Handle explicit nil values * Remove unwanted print lines * Add support for inline scalar arrays
Closes #114
Add support for last-writer-wins scalar arrays of the following types:
Field may currently only be updated by replacing full set, support for updates to specific indexes, or resizing will be added in other tickets.
To do:
sum
aggregate, make sure tests are added here