ErrorsReads and writes · rule
query.condition_unsupported
Query condition is not one an index can serve.
Area 6, Reads and writes; not declinable; the next step is usually the agent's.
type Title = Text { max_length: 80}entity Book { id: Uuid title: Title subtitle: Title? available: Bool}query books_after(title: Book.title) -> List<Book> { from: Book where: Book.title > title order: [Book.title asc] limit: 20}
error Book.title > title isn't a condition a query can use
--> main.jadpo:14:12
|14 | where: Book.title > title | ^^^^^^^^^^^^^^^^^^ not an indexable condition
- reason
>orders numbers, times, dates, durations and quantities, as it does in a body, andBook.titleisTitle.- next
- Compare
Book.titlewith==,!=orin(agent) - rule
- query.
condition_ unsupported - help
- https://jadpo.
dev/docs/errors/query. condition_ unsupported
A standard operation stands where a field does only when it has an exact
SQL form ("Operations in conditions"). text.lower has none,
since PostgreSQL's would follow the database's collation:
type Title = Text { max_length: 80}entity Book { id: Uuid title: Title}query books_titled(title: Book.title) -> List<Book> { from: Book where: text.lower(Book.title) == title order: [Book.title asc] limit: 20}
error text.lower(Book.title) == title isn't a condition a query can use
--> main.jadpo:12:12
|12 | where: text.lower(Book.title) == title | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not an indexable condition
- reason
text.lowerhas no SQL form, an expression PostgreSQL works out exactly as the code does (area 19, "SQL forms"), so the database can't decide this condition.- next
- Compare
Book.titleitself, or keep what the condition needs in a field of its own (agent) - rule
- query.
condition_ unsupported - help
- https://jadpo.
dev/docs/errors/query. condition_ unsupported
Markdown for agents: /docs/errors/query.condition_unsupported.md.Built from Jadpo main at aee2e8f.