table_fetch
Rows from an offset, in input order.
Flags
| Flag | Value |
|---|---|
| Kind | construct: makes a value from values |
| Rows | keeps some rows |
| Deterministic | yes |
| Order matters | yes |
| Decomposable | no |
| Makes | a table value |
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
table |
reference | yes | A value's reference. |
offset |
integer | no | at least 0. Rows skipped. |
count |
integer | no | at least 0. Rows kept; all the rest when absent. |
response_format |
"concise" | "detailed" | no | The byte budget: 64 KiB concise, 512 KiB detailed. |
Example
Over the example tables orders; ${input:name} is an input's reference and ${verb} the value an earlier call made.
table_fetch {
"table": "${input:orders}",
"count": 120
}Result
120 rows
{
"ref": "sha256:06722b0374656f4c1267031107f6b2aba773a183e2fb263c042bb26e99e909c1",
"kind": "table",
"rows": 120,
"schema": "…"
}In the hint language
The same step as a plan, as the language prints it.
output out = from orders
take 120Diagnostics
A refusal comes back as ok: false with coded diagnostics; every code, with its fix, is on the diagnostics page. A parameter that does not match the schema above is ARG_INVALID, with the parameter's path.