From 192f757b13cd04a5fdaba29df9b39e43096e447a Mon Sep 17 00:00:00 2001 From: Nodude <75137537+NodudeWasTaken@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:06:16 +0100 Subject: [PATCH] Fix blob insert bug --- pkg/sqlite/blob.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sqlite/blob.go b/pkg/sqlite/blob.go index 3970836fc3b..f278568a16b 100644 --- a/pkg/sqlite/blob.go +++ b/pkg/sqlite/blob.go @@ -127,7 +127,7 @@ func (qb *BlobStore) write(ctx context.Context, checksum string, data sql.Null[[ q := dialect.Insert(table).Rows(blobRow{ Checksum: checksum, Blob: data, - }).OnConflict(goqu.DoNothing()) + }).OnConflict(goqu.DoNothing()).Prepared(true) _, err := exec(ctx, q) if err != nil { @@ -141,7 +141,7 @@ func (qb *BlobStore) update(ctx context.Context, checksum string, data []byte) e table := qb.table() q := dialect.Update(table).Set(goqu.Record{ "blob": data, - }).Where(goqu.C(blobChecksumColumn).Eq(checksum)) + }).Where(goqu.C(blobChecksumColumn).Eq(checksum)).Prepared(true) _, err := exec(ctx, q) if err != nil {