Socket
Book a DemoInstallSign in
Socket

tspace-mysql

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tspace-mysql

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

latest
Source
npmnpm
Version
1.8.9
Version published
Weekly downloads
179
316.28%
Maintainers
1
Weekly downloads
 
Created
Source

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

FeatureDescription
Supports DriverMySQL ✅ / MariaDB ✅ / Postgres / ✅ MSSQL ⏳ / SQLite3 ⏳ / Oracle ⏳
Query BuilderCreate flexible queries like SELECT, INSERT, UPDATE, and DELETE. You can also use raw SQL.
Join ClausesUse INNER JOIN, LEFT JOIN, RIGHT JOIN, and CROSS JOIN to combine data from multiple tables.
ModelProvides 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.
SchemaAllows you to define and manage the structure of MySQL tables, including data types and relationships. Supports migrations and validation.
ValidationAutomatically checks data against defined rules before saving it to the database, ensuring data integrity and correctness.
SyncSynchronizes the model structure with the database, updating the schema to match the model definitions automatically.
Soft DeletesMarks records as deleted without removing them from the database. This allows for recovery and auditing later.
RelationshipsSet up connections between models, such as one-to-one, one-to-many, belongs-to, and many-to-many. Supports nested relationships and checks.
Type SafetyEnsures that queries are safer by checking the types of statements like SELECT, ORDER BY, GROUP BY, and WHERE.
MetadataGet the metadata of a Model.
RepositoryFollows a pattern for managing database operations like SELECT, INSERT, UPDATE, and DELETE. It helps keep the code organized.
DecoratorsUse decorators to add extra functionality or information to model classes and methods, making the code easier to read.
CachingImproves performance by storing frequently requested data. Supports in-memory caching (like memory DB) and Redis for distributed caching.
MigrationsUse CLI commands to create models, make migrations, and apply changes to the database structure.
BlueprintsCreate a clear layout of the database structure and how models and tables relate to each other.
CLIA 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

Keywords

tspace

FAQs

Package last updated on 14 Sep 2025

Did you know?

Socket

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.

Install

Related posts