
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
mysql-with-kysely
Advanced tools
mysql-with-kysely
use mysql2 and kyselyIncorrect arguments to mysqld_stmt_execute
error safe!
Incorrect arguments to mysqld_stmt_execute
issue$ yarn add mysql-with-kysely
import { toInsertableSchema, toFullSelectableSchema, WithSchema, connect, queryBuilder } from 'mysql-with-kysely'
import type { User } from './model'
// for query builder
type Database = {
user: WithSchema<User>
}
// for your code
type SelectableSchema = toFullSelectableSchema<Database>
type InsertableSchema = toInsertableSchema<Database>
const { db, close } = connect<Database>({ uri: 'mysql://root:root@localhost:3306/test' });
// collect your metrics
db.subscribe(({ sql, normalizedSql, durationMs, occurredAt, parameters }) => {
})
// your query builder
const qb = queryBuilder<Database>()
// write your codes type safely
// type of users is `Array<SelectableSchema['user']>`
// if you don't need created_at & updated_at, use toSelectableSchema instead of toFullSelectableSchema
const users = await db.query(qb
.selectFrom('user')
.selectAll()
.orderBy('id', 'desc')
.limit(1),
)
// type of value is `InsertableSchema['user']`
const value = { name: 'kanziw', email: 'kanziwoong@gmail.com' }
const { insertId } = await db.execute(qb
.insertInto('user')
.values(value),
)
// close MySQL connection
await close()
WithPkId
: for auto increment id
columnWithDataLifecycleTracker
created_at
: for DATETIME DEFAULT CURRENT_TIMESTAMP
updated_at
: for DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
WithSchema
: WithPkId
& WithDataLifecycleTracker
db:sync
script in package.jsonFAQs
Use MySQL with kysely
The npm package mysql-with-kysely receives a total of 26 weekly downloads. As such, mysql-with-kysely popularity was classified as not popular.
We found that mysql-with-kysely 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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.