diff --git a/cf/src/connection.js b/cf/src/connection.js index c9231dc..d42de96 100644 --- a/cf/src/connection.js +++ b/cf/src/connection.js @@ -958,14 +958,14 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose function Execute(portal = '', rows = 0) { return Buffer.concat([ b().E().str(portal + b.N).i32(rows).end(), - Flush + rows === 0 ? Sync : Flush ]) } function Close(portal = '') { return Buffer.concat([ b().C().str('P').str(portal + b.N).end(), - b().S().end() + Sync ]) } diff --git a/cjs/src/connection.js b/cjs/src/connection.js index 10184ca..dfecfda 100644 --- a/cjs/src/connection.js +++ b/cjs/src/connection.js @@ -956,14 +956,14 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose function Execute(portal = '', rows = 0) { return Buffer.concat([ b().E().str(portal + b.N).i32(rows).end(), - Flush + rows === 0 ? Sync : Flush ]) } function Close(portal = '') { return Buffer.concat([ b().C().str('P').str(portal + b.N).end(), - b().S().end() + Sync ]) } diff --git a/deno/src/connection.js b/deno/src/connection.js index 81f26c0..709a8ef 100644 --- a/deno/src/connection.js +++ b/deno/src/connection.js @@ -959,14 +959,14 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose function Execute(portal = '', rows = 0) { return Buffer.concat([ b().E().str(portal + b.N).i32(rows).end(), - Flush + rows === 0 ? Sync : Flush ]) } function Close(portal = '') { return Buffer.concat([ b().C().str('P').str(portal + b.N).end(), - b().S().end() + Sync ]) }