You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason why there is insert_object, replace_object and upsert_object and no update_object and delete_object is as follows.
The syntax for insert/replace is space:insert(tuple)/space:replace(tuple). upsert is replace+update, so its syntax is space:upsert(tuple, ops). For insert, replace and upsert it is expected that user should provide a tuple since one may not exist yet.
On the other hand, the syntax for update/delete is index:update(key, ops)/space:delete(key). It is expected that tuple should already exist, so it may be accessed by its key. The object isn't used here, so there is no corresponding _object method yet. On the other hand, we may implement primary key extraction from the key-value object.
Two separate questions could be considered here:
allowing to specify index key with {key = value} map for update and delete (through update_object and delete_object ),
allowing to use non-primary index for update and delete.
I think we'll discuss these features with product team and then decide either we should or shouldn't support them.
Please add update_object operation similarly to upsert_object: https://github.com/tarantool/crud#upsert
The text was updated successfully, but these errors were encountered: