npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@axiosleo/orm-mysql

v0.15.1

Published

MySQL ORM tool

Readme

@axiosleo/orm-mysql

NPM version npm download node version License FOSSA Status

Installation

npm install @axiosleo/orm-mysql

Usage

const { createClient, QueryHandler } = require("@axiosleo/orm-mysql");

const conn = createClient({
  host: process.env.MYSQL_HOST,
  port: process.env.MYSQL_PORT,
  user: process.env.MYSQL_USER,
  password: process.env.MYSQL_PASS,
  database: process.env.MYSQL_DB,
});

const db = new QueryHandler(conn);

// SELECT
const users = await db.table("users")
  .where("age", ">", 18)
  .orderBy("name", "asc")
  .limit(10)
  .select("id", "name", "age");

// FIND single row
const user = await db.table("users").where("id", 1).find();

// INSERT
await db.table("users").insert({ name: "Joe", age: 18 });

// UPDATE
await db.table("users").where("id", 1).update({ name: "Joe", age: 19 });

// DELETE
await db.table("users").where("id", 1).delete();

// COUNT
const total = await db.table("users").where("age", ">", 18).count();

// TRANSACTION
const tx = await db.beginTransaction({ level: "RC" });
try {
  await tx.table("users").insert({ name: "Joe", age: 18 });
  await tx.commit();
} catch (e) {
  await tx.rollback();
  throw e;
}

For complete API documentation including where conditions, joins, hooks, migrations, and more, install the AI Skills for your coding assistant, or browse the skill files in skills/.

Migration

# Generate migration script
npx orm-mysql generate <name> [dir]

# Run migration
npx orm-mysql migrate up [dir] --host=localhost --port=3306 --user=root --pass=pwd --db=mydb

Migration examples

AI Skills

This project ships with AI Skills that teach AI coding assistants how to use this library correctly. You can install them with a single command:

# Cursor
npx @axiosleo/orm-mysql skills --install=cursor

# Claude Code
npx @axiosleo/orm-mysql skills --install=claude

# Windsurf
npx @axiosleo/orm-mysql skills --install=windsurf

The command detects the locally installed version of @axiosleo/orm-mysql in your node_modules/ and copies the matching skill files. If the package is not installed locally, it will use the bundled skills and remind you to run npm install @axiosleo/orm-mysql.

To uninstall:

npx @axiosleo/orm-mysql skills --uninstall=cursor
npx @axiosleo/orm-mysql skills --uninstall=claude
npx @axiosleo/orm-mysql skills --uninstall=windsurf

Skill Files

| File | Content | |------|---------| | SKILL.md | Setup, class hierarchy, quick start | | query-building.md | table, attr, join, orderBy, limit, groupBy | | where-conditions.md | where, whereIn, whereLike, whereBetween | | crud-operations.md | select, find, insert, update, delete, incrBy | | transactions.md | beginTransaction, isolation levels, row locking |

Manual Installation

For other AI tools, copy the skill files from node_modules/@axiosleo/orm-mysql/skills/ into your tool's custom instructions directory:

cp -r node_modules/@axiosleo/orm-mysql/skills/ .your-tool/skills/orm-mysql-usage/

License

This project is open-sourced software licensed under MIT.

FOSSA Status