You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A POST endpoint cannot serve a read: a single-SELECT template with returns-data answers data: [] #271
Found while fixing the vector-search examples on the landing page (DataZooDE/flapi-landingpage#6), and verified with the 26.11.25 binary.
Every POST/PUT/PATCH/DELETE endpoint takes the write path (DatabaseManager write execution, src/database_manager.cpp around 2446-2490):
A template that is a single SELECT answers {"rows_affected": 0}.
With operation.returns-data: true it answers "data": []. The trailing-SELECT branch only runs when statements.size() > 1, so the rows of a one-statement SELECT are never returned.
A search endpoint commonly takes its input as a POST body: an embedding vector, a long filter, anything too large for a query string. Today it only works with a workaround: a leading SET VARIABLE ...; so that the SELECT becomes a second statement, read back via getvariable().
Options:
With returns-data: true, return the rows of the last statement when it is a SELECT, even when it is the only statement.
Honour operation.type: Read on a POST, so that it runs the read path (validators, rendering, no transaction or write-cache maintenance). CONFIG_REFERENCE §8.1 lists operation.type as "auto-detected", but it is unclear whether an explicit Read is respected for POST.
Whichever is chosen also needs:
the MCP behaviour of such a tool (tools/call currently returns the write result);
an update to CONFIG_REFERENCE §8;
an update to the landing-page vector-search examples, to drop the SET VARIABLE workaround.
Activity
docs: Revise the SQL templates guide from the crew review (#272)
docs: Task guides for every feature area, run in CI (#272) (#274)
Merge stream S1: write path (#271, #277 RETURNING, #264, next link)