Skip to content

Commit bf71578

Browse files
style: fix prettier formatting
Amp-Thread-ID: https://ampcode.com/threads/T-019c5422-b69d-7625-bebc-3afe8c55c76f Co-authored-by: Amp <amp@ampcode.com>
1 parent 50bcd38 commit bf71578

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

lib/base/pool.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ class BasePool extends EventEmitter {
160160
});
161161
}
162162
conn.query(cmdQuery).once('end', () => {
163-
if (queryError && queryError.errno === Errors.ER_OPTION_PREVENTS_STATEMENT) {
163+
if (
164+
queryError &&
165+
queryError.errno === Errors.ER_OPTION_PREVENTS_STATEMENT
166+
) {
164167
conn.destroy();
165168
} else {
166169
conn.release();
@@ -186,14 +189,16 @@ class BasePool extends EventEmitter {
186189
return cb(err);
187190
}
188191
try {
189-
conn.execute(sql, values, (err, rows, fields) => {
190-
if (err && err.errno === Errors.ER_OPTION_PREVENTS_STATEMENT) {
191-
conn.destroy();
192-
}
193-
cb(err, rows, fields);
194-
}).once('end', () => {
195-
conn.release();
196-
});
192+
conn
193+
.execute(sql, values, (err, rows, fields) => {
194+
if (err && err.errno === Errors.ER_OPTION_PREVENTS_STATEMENT) {
195+
conn.destroy();
196+
}
197+
cb(err, rows, fields);
198+
})
199+
.once('end', () => {
200+
conn.release();
201+
});
197202
} catch (e) {
198203
conn.release();
199204
return cb(e);

0 commit comments

Comments
 (0)