Skip to content

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.

ColumnProperties<"bytes", false, false, false>

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.

The bytes, raw or as 0x hex. Hex is taken as the bytes it spells, never as text.

`0x${string}` | Uint8Array<ArrayBufferLike>

BytesValue

If the value is not bytes or hex, or exceeds 128 KiB.

bytes(new TextEncoder().encode("# Hello"))
bytes("0xdeadbeef")