Some server implementations (including the Hrana test server v1) naively parse incoming statements to distinguish between INSERT/UPDATE/DELETE (which return no rows and set rowsAffected) and SELECT (which can return rows and does not set rowsAffected). But this does not work, because INSERT/UPDATE/DELETE can return rows with a RETURNING clause.
Also, these statements can contain a WITH clause, so the INSERT/UPDATE/DELETE keyword does not have to be the first token in the SQL string.
Some server implementations (including the Hrana test server v1) naively parse incoming statements to distinguish between INSERT/UPDATE/DELETE (which return no rows and set
rowsAffected
) and SELECT (which can return rows and does not setrowsAffected
). But this does not work, because INSERT/UPDATE/DELETE can return rows with a RETURNING clause.Also, these statements can contain a WITH clause, so the
INSERT
/UPDATE
/DELETE
keyword does not have to be the first token in the SQL string.