diff --git a/internal/database/encoding.go b/internal/database/encoding.go index 43d3d076..cc7af1b7 100644 --- a/internal/database/encoding.go +++ b/internal/database/encoding.go @@ -2,6 +2,7 @@ package database import ( "encoding/binary" + "strings" "github.com/cockroachdb/errors" "github.com/genjidb/genji/document" @@ -190,6 +191,11 @@ func (e *EncodedDocument) decodeValue(fc *FieldConstraint, b []byte) (types.Valu } } + if v.Type() == types.TextValue { + s := strings.Clone(types.As[string](v)) + v = types.NewTextValue(s) + } + return v, n, nil }