Skip to content

Commit c87ba17

Browse files
committed
Merge pull request mysqljs#529 from clbn/patch-1
Update Readme.md
2 parents e2a3113 + 7d2c824 commit c87ba17

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Readme.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ var mysql = require('mysql');
208208
var pool = mysql.createPool({
209209
host : 'example.org',
210210
user : 'bob',
211-
password : 'secret'
211+
password : 'secret',
212212
});
213213

214214
pool.getConnection(function(err, connection) {
@@ -222,7 +222,7 @@ you can listen to the `connection` event.
222222
```js
223223
pool.on('connection', function(err, connection) {
224224
connection.query('SET SESSION auto_increment_increment=1')
225-
})
225+
});
226226
```
227227

228228
When you are done with a connection, just call `connection.end()` and the
@@ -300,7 +300,7 @@ poolCluster.getConnection('SLAVE*', 'ORDER', function (err, connection) {});
300300
// of namespace : of(pattern, selector)
301301
poolCluster.of('*').getConnection(function (err, connection) {});
302302

303-
var pool = poolCluster.of('SLAVE*', 'RANDOM')
303+
var pool = poolCluster.of('SLAVE*', 'RANDOM');
304304
pool.getConnection(function (err, connection) {});
305305
pool.getConnection(function (err, connection) {});
306306

@@ -320,7 +320,7 @@ poolCluster.end();
320320
```js
321321
var clusterConfig = {
322322
removeNodeErrorCount: 1, // Remove the node immediately when connection fails.
323-
defaultSelector: 'ORDER'
323+
defaultSelector: 'ORDER',
324324
};
325325

326326
var poolCluster = mysql.createPoolCluster(clusterConfig);
@@ -683,7 +683,7 @@ connection.query(options, function(err, results) {
683683
table1_fieldA: '...',
684684
table1_fieldB: '...',
685685
table2_fieldA: '...',
686-
table2_fieldB: '...'
686+
table2_fieldB: '...',
687687
}, ...]
688688
*/
689689
});
@@ -831,7 +831,7 @@ Or on the query level:
831831
var options = {sql: '...', typeCast: false};
832832
var query = connection.query(options, function(err, results) {
833833

834-
}):
834+
});
835835
```
836836

837837
You can also pass a function and handle type casting yourself. You're given some
@@ -848,7 +848,7 @@ connection.query({
848848
}
849849
return next();
850850
}
851-
})
851+
});
852852
```
853853

854854
If you need a buffer there's also a `.buffer()` function and also a `.geometry()` one
@@ -869,7 +869,7 @@ prepend the flag with a minus sign. To add a flag that is not in the default lis
869869
The next example blacklists FOUND_ROWS flag from default connection flags.
870870

871871
```js
872-
var connection = mysql.createConnection("mysql://localhost/test?flags=-FOUND_ROWS")
872+
var connection = mysql.createConnection("mysql://localhost/test?flags=-FOUND_ROWS");
873873
```
874874

875875
### Default Flags

0 commit comments

Comments
 (0)