2
0

Support large large objects.

Fixes #1865.
This commit is contained in:
Mitar
2024-01-14 02:08:27 +01:00
committed by Jack Christensen
parent 0c35c9e630
commit a4ca0917da
3 changed files with 81 additions and 21 deletions
+20
View File
@@ -0,0 +1,20 @@
package pgx
import (
"testing"
)
// SetMaxLargeObjectMessageLength sets internal maxLargeObjectMessageLength variable
// to the given length for the duration of the test.
//
// Tests using this helper should not use t.Parallel().
func SetMaxLargeObjectMessageLength(t *testing.T, length int) {
t.Helper()
original := maxLargeObjectMessageLength
t.Cleanup(func() {
maxLargeObjectMessageLength = original
})
maxLargeObjectMessageLength = length
}