Refactor marshalRaw() to take the full result set