I'm getting an error accessing the variables in this class when running a 'constructor' script. Any thoughts?
/**
* Info
*/
exports.sqlWhiteList = function(){
var sqlImport = require('../DBConnectors/MYSQLConn.js');
var sql = new sqlImport.sqlConn();
//fill up static variables
this.tables = {};
this.attributes = {};
//populate the table names
sql.performQuery(('xxxxxx xxxxx = \'BASE TABLE\' ' +
'AND TABLE_SCHEMA=\'' + sql.credentials.database + '\''),function(rows){
for (var index in rows){
this.tables[rows[index]['TABLE_NAME']] = true; // this fails
}
});
};
Error = "TypeError: Cannot read property 'tables' of undefined"