pub fn pg_rows_to_server_records(
rows: &[PgRow],
record_type: &RecordType,
) -> Result<ServerRecords, SqlError>
Expand description
Converts a slice of PgRow
to a ServerRecords
based on the provided RecordType
.
§Arguments
rows
- A slice ofPgRow
to be converted.record_type
- The type of record to convert to.
§Returns
Result<ServerRecords, SqlError>
- A result containing the convertedServerRecords
or an error.
§Errors
- Returns an error if the conversion fails or if the record type is not supported.