Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
porsager committed Oct 25, 2024
1 parent 5fb70c1 commit 5974e7f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cf/src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
}

function queryError(query, err) {
Object.defineProperties(err, {
'query' in err || 'parameters' in err || Object.defineProperties(err, {
stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug },
query: { value: query.string, enumerable: options.debug },
parameters: { value: query.parameters, enumerable: options.debug },
Expand Down
2 changes: 1 addition & 1 deletion cjs/src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
}

function queryError(query, err) {
'parameters' in err || Object.defineProperties(err, {
'query' in err || 'parameters' in err || Object.defineProperties(err, {
stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug },
query: { value: query.string, enumerable: options.debug },
parameters: { value: query.parameters, enumerable: options.debug },
Expand Down
2 changes: 1 addition & 1 deletion deno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ for await (const chunk of readableStream) {
}
```

> **NOTE** This is a low-level API which does not provide any type safety. To make this work, you must match your [`copy query` parameters](https://www.postgresql.org/docs/14/sql-copy.html) correctly to your [Node.js stream read or write](https://nodejs.org/api/stream.html) code. Ensure [Node.js stream backpressure](https://nodejs.org/en/docs/guides/backpressuring-in-streams/) is handled correctly to avoid memory exhaustion.
> **NOTE** This is a low-level API which does not provide any type safety. To make this work, you must match your [`copy query` parameters](https://www.postgresql.org/docs/14/sql-copy.html) correctly to your [Node.js stream read or write](https://nodejs.org/api/stream.html) code. Ensure [Node.js stream backpressure](https://nodejs.org/en/learn/modules/backpressuring-in-streams) is handled correctly to avoid memory exhaustion.
### Canceling Queries in Progress

Expand Down
2 changes: 1 addition & 1 deletion deno/src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
}

function queryError(query, err) {
Object.defineProperties(err, {
'query' in err || 'parameters' in err || Object.defineProperties(err, {
stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug },
query: { value: query.string, enumerable: options.debug },
parameters: { value: query.parameters, enumerable: options.debug },
Expand Down
2 changes: 1 addition & 1 deletion deno/tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2583,4 +2583,4 @@ t('arrays in reserved connection', async() => {
]
})

;window.addEventListener("unload", () => Deno.exit(process.exitCode))
;globalThis.addEventListener("unload", () => Deno.exit(process.exitCode))

0 comments on commit 5974e7f

Please sign in to comment.