stabilize-orm 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,36 +2,34 @@
2
2
 
3
3
  _A Modern, Type-Safe, and Expressive ORM for Bun_
4
4
 
5
- <p align="left">
6
- <img src="./public/logo_both-transparent.png" alt="Stabilize ORM Logo" width="280" />
7
- </p>
8
-
9
5
  <p align="left">
10
6
  <a href="https://www.npmjs.com/package/stabilize-orm"><img src="https://img.shields.io/npm/v/stabilize-orm.svg?label=version&color=blue" alt="NPM Version"></a>
11
- <a href="https://github.com/ElectronSz/stabilize-cli/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/stabilize-orm.svg?color=green" alt="License"></a>
12
- <a href="https://github.com/ElectronSz/stabilize-cli"><img src="https://img.shields.io/badge/Cli-Stabilize%202.1.0-blue.svg" alt="Stabilize CLI"></a>
7
+ <a href="https://github.com/ElectronSz/stabilize-orm/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/stabilize-orm.svg?color=green" alt="License"></a>
8
+ <a href="https://github.com/ElectronSz/stabilize-cli"><img src="https://img.shields.io/badge/Cli-Stabilize%202.2.1-blue.svg" alt="Stabilize CLI"></a>
13
9
  <a href="#"><img src="https://img.shields.io/badge/PostgreSQL-supported-blue" alt="PostgreSQL"></a>
14
10
  <a href="#"><img src="https://img.shields.io/badge/MySQL-supported-blue" alt="MySQL"></a>
15
11
  <a href="#"><img src="https://img.shields.io/badge/SQLite-supported-blue" alt="SQLite"></a>
12
+ <a href="#"><img src="https://img.shields.io/badge/SQL%20Server-supported-blue" alt="SQL Server"></a>
16
13
  <a href="https://github.com/ElectronSz/stabilize-orm/actions/workflows/ci-cd.yml">
17
14
  <img src="https://github.com/ElectronSz/stabilize-orm/actions/workflows/ci-cd.yml/badge.svg" alt="Build Status">
18
15
  </a>
19
16
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="MIT License"></a>
20
17
  </p>
21
18
 
22
- **Stabilize** is a lightweight, feature-rich ORM designed for performance and developer experience. It provides a unified, database-agnostic API for **PostgreSQL**, **MySQL**, and **SQLite**. Powered by a robust query builder, programmatic model definitions, automatic versioning, and a full-featured command-line interface, Stabilize is built to scale with your app.
19
+ **Stabilize** is a lightweight, feature-rich ORM designed for performance and developer experience. It provides a unified, database-agnostic API for **PostgreSQL**, **MySQL/MariaDB**, **SQLite**, and **SQL Server**. Powered by a robust query builder, programmatic model definitions, automatic versioning, and a full-featured command-line interface, Stabilize is built to scale with your app.
23
20
 
24
21
  ---
25
22
 
26
23
  ## 🚀 Features
27
24
 
28
- - **Unified API**: Write once, run on PostgreSQL, MySQL, or SQLite.
25
+ - **Unified API**: Write once, run on PostgreSQL, MySQL/MariaDB, SQLite, or SQL Server.
29
26
  - **Programmatic Model Definitions**: Define models and columns using the `defineModel` API with the `DataTypes` enum for database-agnostic schemas.
30
27
  - **Full-Featured CLI**: Generate models, manage migrations, seed data, and reset your database from the command line with [stabilize-cli](https://github.com/ElectronSz/stabilize-cli).
31
28
  - **Automatic Migrations**: Generate database-specific SQL schemas directly from your model definitions.
29
+ - **First-Class SQL Server Support**: `DBType.MSSQL` selects the `mssql` v12 driver, with T-SQL-specific query generation (`OUTPUT INSERTED.*`, `OFFSET … FETCH`, `MERGE` for upserts) and schema generation via `OBJECT_ID` / `sys.indexes` probes. Placeholders are rewritten automatically — you keep writing `?`.
32
30
  - **Versioned Models & Time-Travel**: Enable versioning in your model configuration for automatic history tables and snapshot queries.
33
31
  - **Retry Logic**: Automatic exponential backoff for database queries to handle transient connection issues.
34
- - **Connection Pooling**: Efficient connection management for PostgreSQL and MySQL.
32
+ - **Connection Pooling**: Efficient connection management for PostgreSQL, MySQL, and SQL Server, with `poolStats()` reporting borrowed/available/size on SQL Server.
35
33
  - **Transactional Integrity**: Built-in support for atomic transactions with automatic rollback on failure.
36
34
  - **Advanced Query Builder**: Fluent, chainable API for building complex queries, including joins, filters, ordering, and pagination.
37
35
  - **Pagination Helper**: Easily paginate any query with `.paginate(page, pageSize)` and get `{ data, total, page, pageSize }`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stabilize-orm",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "A modern, type-safe ORM for Bun, Node.js, and Deno with support for SQLite, MySQL, PostgreSQL, Redis caching, optimistic locking, cursor pagination, and a full-featured query builder.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",