Notice constructor

Notice(
  1. {required String severity,
  2. required String code,
  3. required String message,
  4. String? detail,
  5. String? hint,
  6. String? position,
  7. String? internalPosition,
  8. String? internalQuery,
  9. String? where,
  10. String? schema,
  11. String? table,
  12. String? column,
  13. String? dataType,
  14. String? constraint,
  15. String? file,
  16. String? line,
  17. String? routine}
)

deno-postgres@v0.17.0/Notice.

Implementation

factory Notice({
  required String severity,
  required String code,
  required String message,
  String? detail,
  String? hint,
  String? position,
  String? internalPosition,
  String? internalQuery,
  String? where,
  String? schema,
  String? table,
  String? column,
  String? dataType,
  String? constraint,
  String? file,
  String? line,
  String? routine,
}) {
  return jsify({
    'severity': severity,
    'code': code,
    'message': message,
    if (detail != null) 'detail': detail,
    if (hint != null) 'hint': hint,
    if (position != null) 'position': position,
    if (internalPosition != null) 'internalPosition': internalPosition,
    if (internalQuery != null) 'internalQuery': internalQuery,
    if (where != null) 'where': where,
    if (schema != null) 'schema': schema,
    if (table != null) 'table': table,
    if (column != null) 'column': column,
    if (dataType != null) 'dataType': dataType,
    if (constraint != null) 'constraint': constraint,
    if (file != null) 'file': file,
    if (line != null) 'line': line,
    if (routine != null) 'routine': routine,
  }) as Notice;
}