-
Notifications
You must be signed in to change notification settings - Fork 191
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
[payments] numeric incremental updates, query with ordering and lim #788
Conversation
03900ad
to
8cc0e7b
Compare
131ee44
to
1692ab3
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.
let's add tests for the new methods in client_test.go
common/aws/dynamodb/client.go
Outdated
@@ -156,6 +157,35 @@ func (c *Client) UpdateItem(ctx context.Context, tableName string, key Key, item | |||
return resp.Attributes, err | |||
} | |||
|
|||
func (c *Client) IncrementBy(ctx context.Context, tableName string, key Key, itemKey string, itemValue uint64) (Item, error) { |
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.
nit: attr string, value uint64
?
(itemValue
sounds like it will be assigned this new value)
feb5543
to
a8a6ca9
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.
one comment, lgtm otherwise
common/aws/dynamodb/client.go
Outdated
@@ -191,6 +222,23 @@ func (c *Client) QueryIndex(ctx context.Context, tableName string, indexName str | |||
return response.Items, nil | |||
} | |||
|
|||
// QueryIndexOrderWithLimit returns all items in the index that match the given key | |||
func (c *Client) QueryIndexOrderWithLimit(ctx context.Context, tableName string, indexName string, keyCondition string, expAttributeValues ExpresseionValues, forward bool, limit int32) ([]Item, error) { |
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.
test for this method as well?
1dec83c
to
af1d9fe
Compare
af1d9fe
to
a6810c2
Compare
Why are these changes needed?
Checks