publishExternal
function publishExternal( batch, storage, options?): Promise<ExternalRef>;Defined in: src/external.ts:433
Publish a unary result batch once and return a reusable ExternalRef.
Serializes batch exactly as the per-call externalizer does (an IPC stream
of its schema plus this one batch), hashes the raw bytes, compresses when
options.compression is given, and calls storage.upload once. Cache the
returned ref and return it from the unary handler on later calls; the
server writes the pointer directly.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
batch |
VgiBatch |
The 1-row result batch, built against the method’s result schema (see publishExternalResult to build it from values). |
storage |
ExternalStorage |
Storage backend to upload to. |
options |
PublishExternalOptions |
Compression and digest options. |
Returns
Section titled “Returns”Promise<ExternalRef>
Throws
Section titled “Throws”Error if batch does not have exactly one row.
