Expose list_blobbified_ranges for tenants in python API (#9940)

* add tenant getId api to fdbcli

* expose list_blobbified_ranges for tenants in python API
This commit is contained in:
Jon Fu 2023-04-13 10:05:37 -07:00 committed by GitHub
parent fe0a4df06a
commit 30132ebac6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -1345,6 +1345,18 @@ class Tenant(_TransactionCreator):
def get_id(self):
return FutureInt64(self.capi.fdb_tenant_get_id(self.tpointer))
def list_blobbified_ranges(self, begin, end, limit):
return FutureKeyValueArray(
self.capi.fdb_tenant_list_blobbified_ranges(
self.tpointer,
begin,
len(begin),
end,
len(end),
limit
)
)
fill_operations()
@ -1722,6 +1734,16 @@ def init_c_api():
_capi.fdb_tenant_get_id.argtypes = [ctypes.c_void_p]
_capi.fdb_tenant_get_id.restype = ctypes.c_void_p
_capi.fdb_tenant_list_blobbified_ranges.argtypes = [
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.c_int,
ctypes.c_void_p,
ctypes.c_int,
ctypes.c_int,
]
_capi.fdb_tenant_list_blobbified_ranges.restype = ctypes.c_void_p
_capi.fdb_tenant_create_transaction.argtypes = [
ctypes.c_void_p,
ctypes.POINTER(ctypes.c_void_p),