Skip to content

Commit 529f082

Browse files
committed
Updating node-db, package, and README
1 parent 4014aa3 commit 529f082

File tree

6 files changed

+25
-8
lines changed

6 files changed

+25
-8
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ database bindings visit the [Node.js DB homepage] [homepage].
55

66
## INSTALL ##
77

8+
Before proceeding with installation, you need to have the libmysql
9+
development libraries and include files. Access to the mysql_config
10+
binary is mandatory, and has to be part of the path prior to
11+
installation. If the path to your mysql_config is
12+
/usr/local/bin/mysql_config make sure to do the following (Ubuntu
13+
users need to install the libmysqlclient-dev package):
14+
15+
$ export PATH=/usr/local/bin:$PATH
16+
17+
Once you are sure mysql_config is part of the path, install with npm:
18+
819
$ npm install db-mysql
920

1021
## QUICK START ##

lib/node-db

Submodule node-db updated 2 files

package.json

Lines changed: 7 additions & 2 deletions
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"
5-
, "version" : "0.4.1"
5+
, "version" : "0.4.5"
66
, "engines" : { "node" : ">=0.4.1" }
77
, "maintainers" :
88
[ { "name": "Mariano Iglesias"
@@ -18,8 +18,13 @@
1818
]
1919
, "main" : "./db-mysql"
2020
, "scripts" :
21-
{ "install" : "node-waf configure build"
21+
{ "install": "node-waf configure build"
22+
, "preuninstall": "rm -rf build/*"
2223
, "test" : "node-waf test"
2324
, "doc" : "node-waf doc"
2425
}
26+
, "devDependencies" :
27+
{ "nodeunit" : "*"
28+
, "nodelint" : "*"
29+
}
2530
}

src/result.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const char** node_db_mysql::Result::next() throw(node_db::Exception&) {
127127
return (const char**) this->previousRow;
128128
}
129129

130-
uint64_t* node_db_mysql::Result::columnLengths() throw(node_db::Exception&) {
130+
unsigned long* node_db_mysql::Result::columnLengths() throw(node_db::Exception&) {
131131
return mysql_fetch_lengths(this->result);
132132
}
133133

src/result.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Result : public node_db::Result {
2929
~Result();
3030
bool hasNext() const;
3131
const char** next() throw(node_db::Exception&);
32-
uint64_t* columnLengths() throw(node_db::Exception&);
32+
unsigned long* columnLengths() throw(node_db::Exception&);
3333
uint64_t index() const throw(std::out_of_range&);
3434
Column* column(uint16_t i) const throw(std::out_of_range&);
3535
uint64_t insertId() const;

wscript

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ def configure(conf):
3232
conf.env.append_unique('CXXFLAGS', ["-Wconversion", "-Wshadow", "-Wsign-conversion", "-Wunreachable-code", "-Wredundant-decls", "-Wcast-qual"])
3333

3434
# MySQL flags and libraries
35-
conf.env.append_unique('CXXFLAGS', Utils.cmd_output(Options.options.mysql_config + ' --include').split())
36-
conf.env.append_unique('LINKFLAGS', Utils.cmd_output(Options.options.mysql_config + ' --libs_r').split())
35+
mysql_config = conf.find_program(Options.options.mysql_config, mandatory=True)
36+
conf.env.append_unique('CXXFLAGS', Utils.cmd_output(mysql_config + ' --include').split())
37+
conf.env.append_unique('LINKFLAGS', Utils.cmd_output(mysql_config + ' --libs_r').split())
3738

3839
if not conf.check_cxx(lib="mysqlclient_r", errmsg="not found, try to find nonthreadsafe libmysqlclient"):
3940
# link flags are needed to find the libraries
40-
conf.env.append_unique('LINKFLAGS', Utils.cmd_output(Options.options.mysql_config + ' --libs').split())
41+
conf.env.append_unique('LINKFLAGS', Utils.cmd_output(mysql_config + ' --libs').split())
4142
if conf.check_cxx(lib="mysqlclient"):
4243
conf.env.append_unique('CXXDEFINES', ["MYSQL_NON_THREADSAFE"])
4344
else:

0 commit comments

Comments
 (0)