diff options
author | 2024-11-08 13:51:23 +0000 | |
---|---|---|
committer | 2024-11-08 13:51:23 +0000 | |
commit | 29007b1b886e7455ece5aa6e4d477805209fad88 (patch) | |
tree | 21b11cbf12faf71d44d43c61a2d4916b7bd82b80 /vendor/github.com/uptrace/bun/model_map.go | |
parent | bump ncruces/go-sqlite3 to v0.20.2 (#3524) (diff) | |
download | gotosocial-29007b1b886e7455ece5aa6e4d477805209fad88.tar.xz |
[chore] update bun libraries to v1.2.5 (#3528)
* update bun libraries to v1.2.5
* pin old v1.29.0 of otel
Diffstat (limited to 'vendor/github.com/uptrace/bun/model_map.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/model_map.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/github.com/uptrace/bun/model_map.go b/vendor/github.com/uptrace/bun/model_map.go index 814d636e6..d7342576f 100644 --- a/vendor/github.com/uptrace/bun/model_map.go +++ b/vendor/github.com/uptrace/bun/model_map.go @@ -1,6 +1,7 @@ package bun import ( + "bytes" "context" "database/sql" "reflect" @@ -82,6 +83,8 @@ func (m *mapModel) Scan(src interface{}) error { return m.scanRaw(src) case reflect.Slice: if scanType.Elem().Kind() == reflect.Uint8 { + // Reference types such as []byte are only valid until the next call to Scan. + src := bytes.Clone(src.([]byte)) return m.scanRaw(src) } } |