bytes
Call Signature
Section titled “Call Signature”bytes():
ColumnProperties<"bytes",false,false,false>
Defined in: src/schema/values.ts:415
A bytes column — a blob. Bytes are stored but never indexed, so a bytes column has no
.indexed(): it can be selected, not filtered on. A schema may have several, within the
MAX_ATTRIBUTES cap on columns — but the bytes values of one create or patch share a single
MAX_ENTITY_BYTES budget.
Returns
Section titled “Returns”ColumnProperties<"bytes", false, false, false>
Call Signature
Section titled “Call Signature”bytes(
value):BytesValue
Defined in: src/schema/values.ts:428
Opaque bytes of any length up to 128 KiB — a document, an image, a serialized object. This is the
default type for a bare Uint8Array, so { body: buf } and { body: bytes(buf) } are the same
value.
Parameters
Section titled “Parameters”The bytes, raw or as 0x hex. Hex is taken as the bytes it spells, never as text.
`0x${string}` | Uint8Array<ArrayBufferLike>
Returns
Section titled “Returns”Throws
Section titled “Throws”If the value is not bytes or hex, or exceeds 128 KiB.
Example
Section titled “Example”bytes(new TextEncoder().encode("# Hello"))bytes("0xdeadbeef")