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
I tried to use LIMIT in a DELETE query but tool didn't not detect the query.
I searched about sqlite available clauses for DELETE. By default, SQLite doesn't support LIMIT clause on DELETE statement, but it can be available if sqlite is compiled with a custom option ([https://sqlite.org/compile.html#enable_update_delete_limit])
Tool might support this clause for UPDATE or DELETE statements, also it might generate a warning message about this usage instead of ignoring the query.
Relevant log output
# package db
error parsing queries: no queries contained in paths /home/<sqlc config path>/query.sql
Database schema
CREATETABLEchallenges (
status TEXT
);
SQL queries
-- name: DeleteChallenge :execDELETEFROM challenges WHERE status = ? LIMIT1;
kyleconroy
changed the title
It doesn't detect DELETE statements when they contain a LIMIT clause on sqlite engine
DELETE statements with a LIMIT do not work
Jun 6, 2023
Version
Other
What happened?
I tried to use LIMIT in a DELETE query but tool didn't not detect the query.
I searched about sqlite available clauses for DELETE. By default, SQLite doesn't support LIMIT clause on DELETE statement, but it can be available if sqlite is compiled with a custom option ([https://sqlite.org/compile.html#enable_update_delete_limit])
Tool might support this clause for UPDATE or DELETE statements, also it might generate a warning message about this usage instead of ignoring the query.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/031d55af21ebcebb19764888c1f2056714e6e48681930286d0841d2740ce20a6
What operating system are you using?
Linux
What database engines are you using?
No response
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: