Skip to content

Conversation

DifferentialOrange
Copy link
Member

Refer to #382

Before this patch, the behavior of `*_many` requests if empty array of
tuples/objects were rather confusing. For example, due to format
processing all `*_object_many` operations resulted in `nil, {}` --
error request with zero errors. `insert_many` and `replace_many` calls
result in `nil, nil` -- no result, no error. `upsert_many` results in
`{metadata = metadata}, nil` with no `rows` in response. Thus, for all
six `*_many` calls trying to execute the request with empty array on
input result in malformed response.

After this patch, trying to run `*_many` request with empty array of
tuples/objects will result in `nil, {err}`, similar to existing
`*_many` API. Single tuple crud API already does not allow to run with
no tuples/objects.

Closes #377
@DifferentialOrange DifferentialOrange merged commit 6b20c8c into master Oct 10, 2023
@DifferentialOrange DifferentialOrange deleted the DifferentialOrange/gh-377-no-rows-error branch October 10, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants