如何使用 Nestjs 连接到 Planetscale
<p>我使用 typeorm 创建了一个 Nest 应用程序,其中包含 mysql 中的许多表。</p>
<p>当我尝试将数据库连接到planetscale时,它显示相应的错误:</p>
<pre class="brush:php;toolbar:false;">[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)</pre>
<p>当我尝试将其连接到 <strong>planetscale</strong> 在线数据库时,我有许多表由许多行组成,它显示了这些错误。</p>
<p>请帮助我处理此数据库连接,不要出现任何错误...</p>