severityFromString static method

PostgreSQLSeverity severityFromString(
  1. String? str
)

Implementation

static PostgreSQLSeverity severityFromString(String? str) {
  switch (str) {
    case 'ERROR':
      return PostgreSQLSeverity.error;
    case 'FATAL':
      return PostgreSQLSeverity.fatal;
    case 'PANIC':
      return PostgreSQLSeverity.panic;
    case 'WARNING':
      return PostgreSQLSeverity.warning;
    case 'NOTICE':
      return PostgreSQLSeverity.notice;
    case 'DEBUG':
      return PostgreSQLSeverity.debug;
    case 'INFO':
      return PostgreSQLSeverity.info;
    case 'LOG':
      return PostgreSQLSeverity.log;
    default:
      return PostgreSQLSeverity.unknown;
  }
}