- class docarray.array.storage.base.getsetdel.BaseGetSetDelMixin#
Provide abstract methods and derived methods for
- The following methods must be implemented:
Keep in mind that these methods above ** must not ** handle offset2id of the DocumentArray.
- These methods are actually wrapped by the following methods which handle the offset2id:
Therefore, you should make sure to use the wrapper methods in case you expect offset2id to be updated, and use the inner methods in case you don’t want to handle offset2id (for example, if you want to handle it in a later step)
Other methods implemented a generic-but-slow version that leverage the methods above. Please override those methods in the subclass whenever a more efficient implementation is available. Mainly, if the backend storage supports operations in batches, you can implement the following methods:
Likewise, the methods above do not handle offset2id. They are wrapped by the following methods that update the offset2id in a single step: