Skip to content

Commit 0fdff1a

Browse files
committed
revert formatting changes
1 parent 955db3b commit 0fdff1a

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

examples/promise-co-await/co.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const mysql = require('mysql2/promise');
44
const co = require('co');
55

6-
co(function* () {
6+
co(function*() {
77
const c = yield mysql.createConnection({
88
port: 3306,
99
user: 'root',
@@ -14,10 +14,10 @@ co(function* () {
1414
console.log(yield c.execute('select 1+:toAdd as qqq', { toAdd: 10 }));
1515
yield c.end();
1616
})
17-
.then(() => {
17+
.then(function() {
1818
console.log('done');
1919
})
20-
.catch((err) => {
20+
.catch(function(err) {
2121
console.log(err);
2222
throw err;
2323
});

examples/ssl/rds-ssl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const conn = mysql.createConnection({
1111
ssl: 'Amazon RDS'
1212
});
1313

14-
conn.query("show status like 'Ssl_cipher'", (err, res) => {
14+
conn.query("show status like 'Ssl_cipher'", function(err, res) {
1515
console.log(err, res);
1616
conn.end();
1717
});

examples/ssl/select-over-ssl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ const conn = mysql.createConnection({
1616
}
1717
});
1818

19-
conn.query('select 1+1 as test', (err, res) => {
19+
conn.query('select 1+1 as test', function(err, res) {
2020
console.log(res);
21-
conn.query('select repeat("a", 100) as test', (err, res) => {
21+
conn.query('select repeat("a", 100) as test', function(err, res) {
2222
console.log(res);
2323
});
2424
});

test/unit/connection/test-connection_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ assert.throws(
1111
new ConnectionConfig({
1212
ssl: true
1313
}),
14-
(err) => err instanceof TypeError && err.message === expectedMessage,
14+
err => err instanceof TypeError && err.message === expectedMessage,
1515
'Error, the constructor accepts a boolean without throwing the right exception'
1616
);
1717

tools/generate-charset-mapping.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ const mysql2iconv = {
3030

3131
const missing = {};
3232

33-
conn.query('show collation', (err, res) => {
33+
conn.query('show collation', function(err, res) {
3434
console.log(res);
35-
res.forEach((r) => {
35+
res.forEach(r => {
3636
const charset = r.Charset;
3737
const iconvCharset = mysql2iconv[charset] || charset; // if there is manuall mapping, override
3838
if (!iconv.encodingExists(iconvCharset)) {
@@ -43,7 +43,7 @@ conn.query('show collation', (err, res) => {
4343
//console.log(JSON.stringify(missing, 4, null));
4444
//console.log(JSON.stringify(charsets, 4, null));
4545
for (let i = 0; i < charsets.length; i += 8) {
46-
console.log(` '${charsets.slice(i, i + 8).join("', '")}',`);
46+
console.log(" '" + charsets.slice(i, i + 8).join("', '") + "',");
4747
}
4848
});
4949

0 commit comments

Comments
 (0)