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

tspace-mysql

v1.9.0

Published

Tspace MySQL is a promise-based ORM for Node.js, designed with modern TypeScript and providing type safety for schema databases.

Readme

tspace-mysql

NPM version NPM downloads

tspace-mysql is an Object-Relational Mapping (ORM) tool designed to run seamlessly in Node.js and is fully compatible with TypeScript. It consistently supports the latest features in both TypeScript and JavaScript, providing additional functionalities to enhance your development experience.

Feature

| Feature | Description | |--------------------------------|---------------------------------------------------------------------------------------------------------| | Supports Driver | MySQL ✅ / MariaDB ✅ / Postgres / ✅ MSSQL ⏳ / SQLite3 ⏳ / Oracle ⏳ | | Query Builder | Create flexible queries like SELECT, INSERT, UPDATE, and DELETE. You can also use raw SQL. | | Join Clauses | Use INNER JOIN, LEFT JOIN, RIGHT JOIN, and CROSS JOIN to combine data from multiple tables. | | Model | Provides a way to interact with database records as objects in code. You can perform create, read, update, and delete (CRUD) operations. Models also support soft deletes and relationship methods. | | Schema | Allows you to define and manage the structure of MySQL tables, including data types and relationships. Supports migrations and validation. | | Validation | Automatically checks data against defined rules before saving it to the database, ensuring data integrity and correctness. | | Sync | Synchronizes the model structure with the database, updating the schema to match the model definitions automatically. | | Soft Deletes | Marks records as deleted without removing them from the database. This allows for recovery and auditing later. | | Relationships | Set up connections between models, such as one-to-one, one-to-many, belongs-to, and many-to-many. Supports nested relationships and checks. | | Type Safety | Ensures that queries are safer by checking the types of statements like SELECT, ORDER BY, GROUP BY, and WHERE. | | Metadata | Get the metadata of a Model. | | Repository | Follows a pattern for managing database operations like SELECT, INSERT, UPDATE, and DELETE. It helps keep the code organized. | | Decorators | Use decorators to add extra functionality or information to model classes and methods, making the code easier to read. | | Caching | Improves performance by storing frequently requested data. Supports in-memory caching (like memory DB) and Redis for distributed caching. | | Migrations | Use CLI commands to create models, make migrations, and apply changes to the database structure. | | Blueprints | Create a clear layout of the database structure and how models and tables relate to each other. | | CLI | A Command Line Interface for managing models, running migrations, executing queries, and performing other tasks using commands (like make:model, migrate, and query). |

Install

Install with npm:

# Install tspace-mysql locally for your project
npm install tspace-mysql --save

# Install tspace-mysql globally (optional)
npm install -g tspace-mysql

# Install database drivers if needed:
# For MariaDB
npm install mariadb --save

# For PostgreSQL
npm install pg --save

# MySQL2 driver is installed by default with tspace-mysql

Documentation

See the docs directory for full documentation.

Basic Usage