getValueByColNameAsString method

String getValueByColNameAsString(
  1. int row,
  2. String column, {
  3. int? length,
  4. Encoding? encoding,
})

Access to the data

Implementation

String getValueByColNameAsString(int row, String column,
    {int? length, Encoding? encoding}) {
  if (row < 0 || row >= rows) throw LibPqException("Row index out of range!");
  for (int i = 0; i < columns; i++) {
    if (columnNames[i] == column)
      return getValueAsString(row, i, length: length, encoding: encoding);
  }
  throw LibPqException("Column $column not found!");
}