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
QueryFailedError: 💔 Your query failed to parse.
This is most likely due to a SQL syntax error. However, you might also have hit a bug, or an unimplemented feature of pg-mem.
If this is the case, please file an issue at https://github.com/oguimbal/pg-mem along with a query that reproduces this syntax error.
👉 Failed query:
INSERT INTO "github_org"("id", "githubId", "githubLogin", "name", "avatarURL", "createdAt", "updatedAt") VALUES ('C5aR4nTlebRqTmM7agZc', '2', 'org2_login', 'org2', 'google.com', DEFAULT, DEFAULT), ('vjFuYovcIvHAk6n5dNEz', '3', 'org3_login', 'org3', 'google.com', DEFAULT, DEFAULT) ON CONFLICT ( "githubId" ) DO UPDATE SET "name" = EXCLUDED."name", "avatarURL" = EXCLUDED."avatarURL", "githubLogin" = EXCLUDED."githubLogin" WHERE ("github_org"."name" IS DISTINCT FROM EXCLUDED."name" OR "github_org"."avatarURL" IS DISTINCT FROM EXCLUDED."avatarURL" OR "github_org"."githubLogin" IS DISTINCT FROM EXCLUDED."githubLogin") RETURNING "createdAt", "updatedAt";
💀 Syntax error at line 1 col 455:
INSERT INTO "github_org"("id", "githubId", "githubLogin", "name", "avatarURL", "createdAt", "updatedAt") VALUES ('C5aR4nTlebRqTmM7agZc', '2', 'org2_login', 'org2', 'google.com', DEFAULT, DEFAULT), ('vjFuYovcIvHAk6n5dNEz', '3', 'org3_login', 'org3', 'google.com', DEFAULT, DEFAULT) ON CONFLICT ( "githubId" ) DO UPDATE SET "name" = EXCLUDED."name", "avatarURL" = EXCLUDED."avatarURL", "githubLogin" = EXCLUDED."githubLogin" WHERE ("github_org"."name" IS DISTINCT
^
Unexpected kw_distinct token: "distinct". Instead, I was expecting to see one of the following:
- A "kw_null" token
- A "kw_not" token
- A "kw_not" token
- A "kw_true" token
- A "kw_false" token
at PostgresQueryRunner.query (node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
at async InsertQueryBuilder.execute (node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
pg-mem version
2.3.5
The text was updated successfully, but these errors were encountered:
Describe the bug
Error raised when upserting using Typeorm.
To Reproduce
typescript:
Error output:
pg-mem version
2.3.5
The text was updated successfully, but these errors were encountered: