MySQcnL is a NodeJS library built to query large amounts of data from an sql database without spaghetti code, it requires the following node modules:
- Node-Mysql
- jsonfile
This is the function which must be called first to use the library
send it the path of a .JSON which features the following attributes
{
"limit" : "",
"host" : "",
"user" : "",
"password" : "",
"database" : ""
}
This is the function which uses select to pull data from the database
mysqcnl.select({
wanted: columns to select
table: table to select from
where (optional): conditionals
}, callback);
mysqcnl.select({
wanted: "User, Host",
table: "user",
where: "User = 'root'"
} function(data){
...
});
Change attributes of a row.
Add new row to table.
Remove row from a table.