denodrivers / denodrivers/postgres

Interrupted: operation canceled

Open
#428 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
655
Forks
97
PR merge metrics
No merged PRs in 30d

Description

Try to loop array in order to run delete query. Function as below.

```
wheres.forEach(async (where) => {
const deleteSql = `DELETE FROM ${tableName} WHERE ${where}`;
try {
await destinationClient.queryObject(deleteSql);
} catch (err) {
console.log("Error executing query:", err);
await sourceClient.end();
}
})
```

But get this error

```
Error executing query: Interrupted: operation canceled
at async TcpConn.read (deno:ext/net/01_net.js:80:17)
at async BufReader.read (https://deno.land/std@0.114.0/io/buffer.ts:383:12)
at async BufReader.readFull (https://deno.land/std@0.114.0/io/buffer.ts:415:20)
at async Connection.#readMessage (https://deno.land/x/postgres@v0.15.0/connection/connection.ts:152:5)
at async Connection.#simpleQuery (https://deno.land/x/postgres@v0.15.0/connection/connection.ts:672:27)
at async Connection.query (https://deno.land/x/postgres@v0.15.0/connection/connection.ts:928:16)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.