
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
English | 简体中文
http://www.778878.net/docs/#/koa78-mysql78/
use for nodejs ts project
npm i koa78-mysql78
import Mysql78 from "koa78-mysql78";
import UpInfo from "koa78-upinfo";
const config = {
host: "localhost",
port: 3306,
user: "root",
password: "your_password",
database: "your_database",
isLog: true,
isCount: true
};
const mysql78 = new Mysql78(config);
const upInfo = new UpInfo(null).getGuest();
// Execute query
const result = await mysql78.doGet("SELECT * FROM users WHERE id = ?", [1], upInfo);
// Execute update
const affectedRows = await mysql78.doM("UPDATE users SET name = ? WHERE id = ?", ["John", 1], upInfo);
// Execute insert
const insertId = await mysql78.doMAdd("INSERT INTO users (name, email) VALUES (?, ?)", ["Alice", "alice@example.com"], upInfo);
// Execute transaction
const transactionResult = await mysql78.doT(
["UPDATE users SET balance = balance - ? WHERE id = ?", "UPDATE users SET balance = balance + ? WHERE id = ?"],
[[100, 1], [100, 2]],
["Transfer out failed", "Transfer in failed"],
"Transfer operation",
[100, 1, 2],
upInfo
);
// Set custom warning handler
mysql78.setWarnHandler(async (info, kind, up) => {
console.log(`Custom warning handler: ${kind} - ${info}`);
// Implement custom warning handling logic here
});
// Close connection pool
await mysql78.close();
getConnection() to get a connection, remember to use releaseConnection() to release the connection.isLog and isCount options affect performance, it is recommended to enable them only during debugging.doT method instead of manually managing transactions.setWarnHandler method to set custom warning handling logic for more flexible handling and recording of warning information.close() method to close the connection pool and release resources.you can see test/
FAQs
nodejs koa78封装 上传类
The npm package mysql78 receives a total of 3 weekly downloads. As such, mysql78 popularity was classified as not popular.
We found that mysql78 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.