From 74fb2696159904e91ad8a98335b1bb9362363b2b Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Sat, 6 Apr 2024 14:59:52 +0200 Subject: [PATCH] Avoid encoding to hex twice --- drift/lib/src/runtime/types/mapping.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drift/lib/src/runtime/types/mapping.dart b/drift/lib/src/runtime/types/mapping.dart index a97218a89..e60812784 100644 --- a/drift/lib/src/runtime/types/mapping.dart +++ b/drift/lib/src/runtime/types/mapping.dart @@ -124,7 +124,7 @@ final class SqlTypes { } else { // BLOB literals are string literals containing hexadecimal data and // preceded by a single "x" or "X" character. Example: X'53514C697465' - return "x'${hex.encode(dart)}'"; + return "x'$hexString'"; } } else if (dart is DriftAny) { return mapToSqlLiteral(dart.rawSqlValue);