文件名称:like-mysql:适用于MySQL的简单直观的ORM
文件大小:14KB
文件格式:ZIP
更新时间:2024-05-21 13:11:27
mysql orm like simple intuitive
像mysql 适用于MySQL的简单直观的ORM const mysql = require ( 'like-mysql' ) ; const db = mysql . createPool ( { /*config*/ } ) ; // wait until a connection is established db . waitConnection ( ) ; // => Promise as all methods // INSERT INTO ip (addr, hits) VALUES (?, ?) db . insert ( 'ip' , { addr : req . ip , hits : 0 } ) ; // SELECT addr, hits FROM ip WHERE addr = ? db . select ( 'ip' , [ 'addr' , 'hits'
【文件预览】:
like-mysql-master
----.gitignore(45B)
----README.md(7KB)
----test()
--------exists.test.js(795B)
--------transaction.test.js(773B)
--------transaction3.test.js.js(764B)
--------delete.test.js(944B)
--------insert.test.js(868B)
--------count.test.js(775B)
--------select_one.test.js(792B)
--------parse_find.test.js(599B)
--------wait_connection.test.js(222B)
--------transaction2.test.js.js(659B)
--------update2.test.js(1KB)
--------config.js(600B)
--------select_one2.test.js(598B)
--------wait_connection2.test.js(389B)
--------exists2.test.js(575B)
--------update.test.js(1KB)
--------select.test.js(838B)
----LICENSE(1KB)
----package.json(685B)
----index.js(4KB)