Member Junction
    Preparing search index...

    Function ReplaceByteArraysWithBase64

    • 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.

      Type Parameters

      • T extends Record<string, unknown>

      Parameters

      • row: T

        A data row.

      Returns T