(self)
| 749 | |
| 750 | class FutureKeyValueArray(Future): |
| 751 | def wait(self): |
| 752 | self.block_until_ready() |
| 753 | kvs = ctypes.pointer(KeyValueStruct()) |
| 754 | count = ctypes.c_int() |
| 755 | more = ctypes.c_int() |
| 756 | self.capi.fdb_future_get_keyvalue_array(self.fpointer, ctypes.byref(kvs), ctypes.byref(count), ctypes.byref(more)) |
| 757 | return ([KeyValue(ctypes.string_at(x.key, x.key_length), ctypes.string_at(x.value, x.value_length)) |
| 758 | for x in kvs[0:count.value]], count.value, more.value) |
| 759 | |
| 760 | # Logically, we should self._release_memory() after extracting the |
| 761 | # KVs but before returning, but then we would have to store |
| 762 | # the KVs on the python side and in most cases we are about to |
| 763 | # destroy the future anyway |
| 764 | |
| 765 | class FutureKeyArray(Future): |
| 766 | def wait(self): |
nothing calls this directly
no test coverage detected