Convert query type records to structs