crud
crud copied to clipboard
Inconsistent upsert return values
Core Tarantool space:upsert
API is a specific one: it always return nil
in case of success. Following this, crud.upsert
and crud.upsert_many
responses do not have any tuples data. But they do it different.
crud.upsert
success response is { rows = {}, metadata = ... }
, while crud.upsert_many
is { metadata = ... }
(res.rows == nil
). This doesn't sound good. And while it's should be rather easy to fix, we should make sure to make a smooth transition for a user through behavior deprecation first.
The other question that may follow this one is "Why do we return metadata if it's never useful?", but it is likely to be resolved by #267.