MySQL Simplified
Simplified MySQL Package Coded In TypeScript
Installation
npm
npm i mysql-formatted
Usage/Examples
import { Connection } from 'mysql-formatted'
let connection = new Connection({
port: 3308,
user: "username",
password: "password",
host: "localhost",
database: "database"
})
let thisModel = connection.useModel("accounts");
async function Test() {
let data = await thisModel.getByFiledFormat("email", "testaccount2@gmail.com");
if (data.getError() != null) {
console.log(data.getError());
}
else {
let results = data.getResults();
let length = data.getLength();
if (length > 1) {
for (const i in results) {
let d = results[i];
console.log(d);
}
} else {
console.log(results[0])
}
}
}
Screenshots

Author
License
ISC