Skip to content

ItemOutputBuilder

Refines an Item result into a single Item, an array, a cursor or a page.

cursor() and page() take precedence over array() and are always mandatory.

OutputBuilder.item

array(value?): this

Declares the result as an array of Items.

boolean

Whether the result is an array.

this

This builder for chaining.

true

cursor(): this

Declares the result as a cursor over Items, for handlers that return a selector’s execute().

this

This builder for chaining.


mandatory(value?): this

Marks the Item as always present.

boolean

Whether the Item is required.

this

This builder for chaining.

true

page(): this

Declares the result as a page of Items with pagination metadata.

this

This builder for chaining.


toDefinition(): ArrayOutputDefinition | CursorOutputDefinition | ItemOutputDefinition | PageOutputDefinition

Emits the Item output Definition in the shape selected by array, cursor or page.

ArrayOutputDefinition | CursorOutputDefinition | ItemOutputDefinition | PageOutputDefinition