Comparing version 0.4.0 to 0.4.1
@@ -37,3 +37,4 @@ var mysql = require('mysql'); | ||
var handler = handleResults.bind(this, Table, callback); | ||
this.client.query("select * from information_schema.tables where table_schema = ?", [this.client.database], handler); | ||
var db = getClientDatabase(this.client); | ||
this.client.query("select * from information_schema.tables where table_schema = ?", [db], handler); | ||
}; | ||
@@ -43,3 +44,4 @@ | ||
var handler = handleResults.bind(this, Column, callback); | ||
this.client.query("select * from information_schema.columns where table_schema = ? and table_name = ?", [this.client.database, tableName], handler); | ||
var db = getClientDatabase(this.client); | ||
this.client.query("select * from information_schema.columns where table_schema = ? and table_name = ?", [db, tableName], handler); | ||
}; | ||
@@ -67,1 +69,5 @@ | ||
} | ||
function getClientDatabase(client) { | ||
return client.database || client.config.database; | ||
} |
@@ -11,3 +11,3 @@ { | ||
"description": "Relational database metadata extraction library", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"license": "MIT", | ||
@@ -14,0 +14,0 @@ "main": "./lib/db-meta.js", |
@@ -69,2 +69,3 @@ # db-meta | ||
The user may pass a connection object in the options argument using the key connection. If this key is included in the options object, the driver will attempt to use the existing connection. | ||
@@ -71,0 +72,0 @@ ### driver.getVersion(callback) |
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
48636
1144
160
0