Skip to content

Commit f713e03

Browse files
committed
Allowing users to change precision. Fixing and adding tests
1 parent 288a9f2 commit f713e03

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ For more in depth changelog, check the Github Commits:
22

33
https://github.com/mariano/node-db-mysql/commits/master
44

5+
0.7.0
6+
-----
7+
* Fixing issue where ints were treated as floating point numbers
8+
* Allowing user to change precision of floating point numbers
9+
* Fixing unit tests (they require a valid DB connection now. Check the tests-settings.json file)
10+
511
0.6.9
612
-----
713
* Fixing precision with big numbers

lib/node-db

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
, "description" : "MySQL database bindings for Node.JS"
33
, "keywords": ["database","db","native","binding","library","plugin","client","mysql","libmysql"]
44
, "homepage" : "http://nodejsdb.org/db-mysql"
5-
, "version" : "0.6.9"
5+
, "version" : "0.7.0"
66
, "engines" : { "node" : ">=0.4.1" }
77
, "maintainers" :
88
[ { "name": "Mariano Iglesias"

tests-settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"host": "localhost",
3+
"user": "root",
4+
"password": "password",
5+
"database": "node"
6+
}

tests.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
/* Escape & Query building tests */
22

3+
var settings = JSON.parse(require('fs').readFileSync('./tests-settings.json','utf8'));
4+
35
var mysql = require("./db-mysql");
4-
var tests = require("./lib/node-db/tests.js").get(function() {
5-
return new mysql.Database();
6+
var tests = require("./lib/node-db/tests.js").get(function(callback) {
7+
new mysql.Database(settings).connect(function(err) {
8+
if (err) {
9+
throw new Error('Could not connect to test DB');
10+
}
11+
callback(this);
12+
});
613
});
714

815
for(var test in tests) {

0 commit comments

Comments
 (0)