Skip to content

Commit 5cacf64

Browse files
committed
Fix prettier formatting
1 parent 2d16afe commit 5cacf64

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/pg/bench-pipelining.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ async function run() {
8585
)
8686
const pipedNamed = await benchPipelined(
8787
'named prepared',
88-
(n) => Array.from({ length: n }, (_, i) => ({ name: `bench-named-${i}`, text: 'SELECT $1::int AS n', values: [42] })),
88+
(n) =>
89+
Array.from({ length: n }, (_, i) => ({ name: `bench-named-${i}`, text: 'SELECT $1::int AS n', values: [42] })),
8990
BATCH,
9091
SECONDS
9192
)

packages/pg/lib/client.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,10 @@ class Client extends EventEmitter {
765765
if (!this._queryable) {
766766
// socket is dead — force close
767767
this.connection.stream.destroy()
768-
} else if (this.pipelining && (this._getActiveQuery() || this._sentQueryQueue.length > 0 || this._queryQueue.length > 0)) {
768+
} else if (
769+
this.pipelining &&
770+
(this._getActiveQuery() || this._sentQueryQueue.length > 0 || this._queryQueue.length > 0)
771+
) {
769772
// pipelined queries are already on the wire (or queued to send) and will
770773
// complete normally; wait for drain then do a graceful goodbye
771774
this.once('drain', () => this.connection.end())

0 commit comments

Comments
 (0)