sectors: range
entity_id: bytes
entity_offset: int
- crypt_key: bytes
+ crypt_key: Optional[bytes]
@dataclass
cursor.execute(stmt, {"disk_id": disk_id, "sector_size": sector_size})
for (_, rows_iter) in itertools.groupby(cursor, lambda r: r[0]):
rows = list(rows_iter)
- [(slab_id, disk_id, sectors_pg, entity_id, entity_off, key)] = {r[:6] for r in rows}
+ [(slab_id, disk_id, sectors_pg, entity_id, entity_off, key_mem)] = {r[:6] for r in rows}
sectors = range(sectors_pg.lower, sectors_pg.upper)
+ key = None if key_mem is None else bytes(key_mem)
slab = Slab(slab_id, disk_id, sectors, bytes(entity_id), entity_off, key)
# `None' if no hasher match in outer join, otherwise earliest match
- 1
)
) as sector,
- entity.length as entity_length
+ entity.length as entity_length,
substring(hashes, generate_series(0, octet_length(hashes) / 32 - 1, 32), 32) as hash,
crypt_key
from (