mapToSqlConstant method

  1. @override
String mapToSqlConstant(
  1. Uint8List? content
)
override

Maps the given content to a sql literal that can be included in the query string.

Implementation

@override
String mapToSqlConstant(Uint8List? content) {
  if (content == null) return 'NULL';
  // BLOB literals are string literals containing hexadecimal data and
  // preceded by a single "x" or "X" character. Example: X'53514C697465'
  return "x'${hex.encode(content)}'";
}