oguimbal / pg-mem

An in memory postgres DB instance for your unit tests
MIT License
1.89k stars 94 forks source link

QueryFailedError: Syntax error when querying a file path #391

Open AdamBraun opened 4 months ago

AdamBraun commented 4 months ago

Describe the bug

The . in a query throws an error

QueryFailedError: Syntax error at line 1 col 1:
1 /some/image.jpeg
   ^
Unexpected value token: "/some/image.jpeg". Instead, I was expecting to see one of the following:
    - A "start_list" token

💥 This is a nasty error, which was unexpected by pg-mem. Also known "a bug" 😁 Please file an issue !

Failed SQL statement: SELECT "LibraryEntity"."ownerId" AS "LibraryEntity_ownerId" FROM "libraries" "LibraryEntity" WHERE ( ("LibraryEntity"."importPaths" = '/some/image.jpeg') AND ( "LibraryEntity"."deletedAt" IS NULL ) LIMIT 1;

To Reproduce


CREATE TABLE "libraries" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "ownerId" uuid NOT NULL, "importPaths" text array NOT NULL)

pg-mem version

2.8.1