pg_rows_to_server_records

Function pg_rows_to_server_records 

Source
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 of PgRow to be converted.
  • record_type - The type of record to convert to.

§Returns

  • Result<ServerRecords, SqlError> - A result containing the converted ServerRecords or an error.

§Errors

  • Returns an error if the conversion fails or if the record type is not supported.