Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceErrors

ErrorsReads and writes · rule

query.section_required

On this page

A query leaves out a section its result type needs, such as from:, or the limit: that bounds a list.

Area 6, Reads and writes; not declinable; the next step is usually the agent's.

Why Jadpo refuses it

A query's result type says how many records come back, and each kind of result needs sections of its own. Every query names the entity it reads in from:. A list needs order: and limit:, because every list is bounded: a query that could read a whole table would grow slower as the table grows, with nothing in the code to show it.

What it looks like

main.jadpo:

example
type Title = Text {    max_length: 80}entity Book {    id: Uuid    title: Title    subtitle: Title?    available: Bool}query books_titled(title: Book.title) -> List<Book> {    from: Book    where: Book.title == title    order: [Book.id asc]}
jadpo checkcheck failed: 1 error, 1 file

error books_titled returns List<Book> but has no limit:

--> main.jadpo:12:7

   |12 | query books_titled(title: Book.title) -> List<Book> {   |       ^^^^^^^^^^^^ no `limit:`
reason
Every list is bounded: limit: is a number, or a value whose type has a max:.
next
Add limit: <number>, or return Page<T> to read it a page at a time (agent)
rule
query.section_required
help
https://jadpo.dev/docs/errors/query.section_required

(agent) at the end of the next: line means your coding agent can make the fix itself.

A query with no from: is refused in the same way, since nothing says which entity its conditions and order are about:

main.jadpo:

example
type Title = Text {    max_length: 80}entity Book {    id: Uuid    title: Title    subtitle: Title?    available: Bool}query books_titled(title: Book.title) -> List<Book> {    where: Book.title == title    order: [Book.id asc]    limit: 20}
jadpo checkcheck failed: 1 error, 1 file

error books_titled doesn't say what it reads

--> main.jadpo:12:7

   |12 | query books_titled(title: Book.title) -> List<Book> {   |       ^^^^^^^^^^^^ no `from:`
reason
A query reads one entity, named in from:; its conditions, order and includes are about that entity's records.
next
Add from: <Entity> as the query's first line (agent)
rule
query.section_required
help
https://jadpo.dev/docs/errors/query.section_required

How to fix it

If a fixed number of books is enough, add limit::

example
    order: [Book.id asc]    limit: 20

The query gives up to 20 books with that title.

If the caller should be able to read every one, return a Page<Book> and read it a page at a time. The caller passes the page size and the cursor from the page before:

example
query books_titled(title: Book.title, size: PageSize, after: PageCursor?) -> Page<Book> {    from: Book    where: Book.title == title    order: [Book.id asc]    page: {        size: size        after: after    }}

Each call gives up to size books, at most 100, and a next cursor while more remain. Passing that cursor back as after gives the next page.

If the query has no from:, add it as the first line, naming the entity it reads:

example
    from: Book

The query reads Book records, and its where: and order: test their fields.

Markdown for agents: /docs/errors/query.section_required.md.Built from Jadpo main at aee2e8f.