2

I had created a nest app with many tables in mysql using typeorm .

when i try to connect the database to planetscale it show corresponding error :

[Nest] 9160  - 03/23/2023, 3:56:07 AM   **ERROR [ExceptionHandler] can't push predicates on concatenate**
QueryFailedError: **can't push predicates on concatenate**
    at Query.onResult (/workspaces/result-gen/src/driver/mysql/MysqlQueryRunner.ts:222:33)
    at Query.execute (/workspaces/result-gen/node_modules/mysql2/lib/commands/command.js:36:14)
    at PoolConnection.handlePacket (/workspaces/result-gen/node_modules/mysql2/lib/connection.js:488:32)
    at PacketParser.onPacket (/workspaces/result-gen/node_modules/mysql2/lib/connection.js:94:12)
    at PacketParser.executeStart (/workspaces/result-gen/node_modules/mysql2/lib/packet_parser.js:75:16)
    at TLSSocket.<anonymous> (/workspaces/result-gen/node_modules/mysql2/lib/connection.js:387:25)
    at TLSSocket.emit (node:events:512:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:234:10)

I have many tables consist of many rows when i am trying to connect this to a planetscale a online database it showing these errors .

Please help me on this database connection , without any error ...

1 Answers1

0

It seems that there is an update on the way to fix this according to planetScale Github repo. In the meantime, I managed to solve it by adding the following code in the TypeOrmModule params of app.module and also in the DataSource of your config.

synchronize: false
JejeDurden
  • 11
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 13 '23 at 06:13