Closed
Description
opened on Oct 12, 2023
What should be done?
When find
command is invoked with a comment
argument, we pass its value to Collection.Query
. It is not used after that.
We should use it in the generated SQL query. Instead of sending SELECT _json …
to the database, we should send SELECT /* <comment> */ _jsonb …
. We should also properly escape it:
FerretDB/internal/handlers/pg/pgdb/query.go
Lines 177 to 183 in 1ea4ff4
We already have tests for that. Let's check if they fail if we don't escape the comment:
FerretDB/integration/basic_test.go
Lines 104 to 116 in 1ea4ff4
Where?
See references to this issue.
Definition of Done
- both PostgreSQL and SQLite backends updated;
- handler updated;
- spot refactorings done.
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity