We need to do this in order to obtain the correct offsets into the queried columns. Basically probe_meta, measurement_meta and processing_meta are class attributes that are composed into the dataclass, however in the database they need to be stored flat, since nesting is not desirable.
What we are doing here is figuring out how to construct the nested class in order by manually recomputing the offsets of the returned queries.
If we had an ORM this might be all avoided and even without it there is probably a better pattern.
We need to do this in order to obtain the correct offsets into the queried columns. Basically probe_meta, measurement_meta and processing_meta are class attributes that are composed into the dataclass, however in the database they need to be stored flat, since nesting is not desirable.
What we are doing here is figuring out how to construct the nested class in order by manually recomputing the offsets of the returned queries. If we had an ORM this might be all avoided and even without it there is probably a better pattern.