
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@dpapejs/emysql
Advanced tools
🛠️ Based on the basic secondary package of `mysql`, the pursuit of creating a simple and easy to use `mysql-ORM` library.
🛠️ 基于 mysql
基础二次封装,追求打造简单、好用的 mysql-ORM
库.
npm i @dpapejs/emysql@latest -S
import emysql from '@dpapejs/emysql' // 引用库
// 函数实例化
const mysql = new emysql({
password: '[database login password]',
user: '[database login username]',
database: 'database name'
})
// 创建表结构
await mysql.table.create([
{
tableName: 'create_table',
columns: [
{
name: 'id',
dataType: 'INT',
primaryKey: true,
autoIncrement: true,
comments: '主键id'
},
{
name: 'name',
dataType: 'VARCHAR',
length: 45,
notNull: true,
comments: '名称'
},
{
name: 'create_at',
dataType: 'DATETIME',
notNull: true,
comments: '创建时间'
}
]
}
])
// 插入数据
const now = new Date()
await mysql.change.insert({
t: 'create_table',
params: { name: 'test', create_at: now }
})
// 查询数据
const list = await mysql.query({
t: 'query_test',
fields: ['name', 'id'],
condition: { id: 1 }
})
console.log(list) // [{id:1,name:"test"}]
FAQs
🛠️ Based on the basic secondary package of `mysql`, the pursuit of creating a simple and easy to use `mysql-ORM` library.
The npm package @dpapejs/emysql receives a total of 8 weekly downloads. As such, @dpapejs/emysql popularity was classified as not popular.
We found that @dpapejs/emysql demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.