Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@hyoga/egg-mysql
Advanced tools
Readme
一个EGGJS的MySQL操作库,使用链式操作,方便快捷实现数据库操作。
@hyoga/egg-mysql 版本 | egg 1.x |
---|---|
1.x | 😁 |
0.x | ❌ |
@hyoga/mysql
,更多API请查看@hyoga/mysql$ npm i @hyoga/egg-mysql --save
// {app_root}/config/plugin.js
exports.mysql = {
enable: true,
package: '@hyoga/egg-mysql',
};
// {app_root}/app/service/user.js
export default class User extends Service {
private table = 'user';
public async list() {
// sql = SELECT * FROM user WHERE status = 1
return this.app.mysql.table(this.table).where({ status: 1 }).select();
}
}
// {app_root}/config/config.default.js
exports.mysql = {
client: {
host: '127.0.0.1',
port: '3306',
user: 'root',
password: '',
database: 'db',
},
// 是否加载到 app 上,默认开启
app: true,
// 是否加载到 agent 上,默认关闭
agent: false,
};
该插件依赖于@hyoga/mysql,更多API,请移步查看。
请到 hyoga-egg-mysql 移步交流。
FAQs
EGGJS框架MYSQL库
The npm package @hyoga/egg-mysql receives a total of 6 weekly downloads. As such, @hyoga/egg-mysql popularity was classified as not popular.
We found that @hyoga/egg-mysql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.