File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
require('../common');
2+
var Client = require('mysql').Client,
3+
client = Client(TEST_CONFIG),
4+
gently = new Gently();
5+
6+
// our test db might not exist yet, so don't try to connect to it
7+
client.database = '';
8+
client.connect();
9+
10+
client.debug = true;
11+
12+
client.query('SELECT 1 as field_a, 2 as field_b', function(err, results) {
13+
if (err) throw err;
14+
15+
assert.equal(results[0].field_a, 1);
16+
assert.equal(results[0].field_b, 2);
17+
});
18+
19+
client.query('SELECT 3 as field_c', function(err, results) {
20+
if (err) throw err;
21+
22+
assert.equal(results[0].field_c, 3);
23+
client.end();
24+
});

0 commit comments

Comments
 (0)