@aizu/ezmysql
v1.2.0
Published
Wrapper for official mysql node modules.
Downloads
7
Readme
@aizu/ezmysql
Wrapper for official mysql node modules.
Install
$ npm install @aizu/ezmysql
Usage
const { db_row, db_results, db_update, db_insert } = require("@aizu/ezmysql");
const users = db_row("SELECT * FROM users")['name'];
//=> "John Abruzzi"
Other functions
const user = await db_results("SELECT * FROM test")
const user = await db_row("SELECT * FROM test")
await db_update('test',{ key:5, value:'aizu test 3' }, { key:5 }, { autoinsert:true })
await db_insert('test', { key:8, value:'aizu' })