{"library":"mysql-database","title":"mysql-database","description":"Easily modify MySQL database data with easy functions. Current stable version is 1.3.2. Provides a simplified API with Promise support and events like connected, dataModification, tableCreate/Delete/Clear/Rename. Methods include set, get, push, pull, add, subtract, exists, clear, delete, and base_set/base_get for encrypted rows. Key differentiator is the event system mirroring library actions. Last updated in 2022, release cadence unknown. Not actively maintained since 2022.","language":"javascript","status":"active","last_verified":"Sat May 09","install":{"commands":["npm install mysql-database"],"cli":null},"imports":["const MySQL = require('mysql-database');","const db = await database.connect({ host: 'localhost', user: 'root', password: '', database: 'test' });","db.on('connected', (connection) => { console.log(connection); });"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const MySQL = require('mysql-database');\nconst database = new MySQL();\n\nasync function main() {\n  const db = await database.connect({\n    host: 'localhost',\n    user: 'root',\n    password: process.env.DB_PASSWORD ?? '',\n    database: 'my_database'\n  });\n\n  db.on('connected', () => console.log('Connected'));\n  await db.set('users', '1', { name: 'Alice', age: 30 });\n  const user = await db.get('users', '1');\n  console.log(user); // { name: 'Alice', age: 30 }\n  await db.end();\n}\nmain().catch(console.error);","lang":"javascript","description":"Connect to MySQL, set and get a key-value pair, then close connection.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}