Returns row with every top-level byte-array value replaced by its base64 string.
Copy-on-write: when the row holds no byte arrays (the normal case, since the database providers
already convert binary columns) the same object is returned untouched; otherwise a shallow copy
is returned and the original — which may be a frozen cache entry — is never modified.
Use it as a safety net wherever rows are serialized for a transport: JSON.stringify turns a
Node Buffer into {"type":"Buffer","data":[...]} and GraphQL's String scalar rejects it.
Returns
rowwith every top-level byte-array value replaced by its base64 string.Copy-on-write: when the row holds no byte arrays (the normal case, since the database providers already convert binary columns) the same object is returned untouched; otherwise a shallow copy is returned and the original — which may be a frozen cache entry — is never modified.
Use it as a safety net wherever rows are serialized for a transport:
JSON.stringifyturns a NodeBufferinto{"type":"Buffer","data":[...]}and GraphQL'sStringscalar rejects it.