# Sutando > A modern Node.js ORM, support MySQL, PostgreSQL, SQLite, MariaDB, SQL Server, Oracle, and more Sutando is a modern Node.js ORM with an Active Record API modelled on Laravel's Eloquent: models, relationships, a fluent query builder, migrations, transactions, hooks, and soft deletes, over MySQL, PostgreSQL, SQLite, MariaDB, SQL Server, or Oracle. Install it with `npm install sutando` plus the driver for your database; `npx sutando init` scaffolds a project and `npx sutando migrate:make` / `npx sutando migrate:run` handle migrations. The Guide below is the reference; the Blog covers comparisons and tutorials. ## Blog ### Posts - [A Modern Alternative to Bookshelf.js: Migrating to Sutando](https://sutando.org/blog/posts/modern-alternative-to-bookshelfjs-migrating-to-sutando): Bookshelf.js was once the go-to ORM for Node.js developers who wanted a simple, promise-based interface on top of Knex.js. But with no updates since 2022,… - [A Modern Alternative to Objection.js: Migrating to Sutando](https://sutando.org/blog/posts/modern-alternative-to-objectionjs-migrating-to-sutando): Objection.js has been a popular ORM in the Node.js ecosystem for years. Built on top of Knex.js, it offered a flexible, SQL-friendly approach to database… - [Building a REST API with Sutando and Express](https://sutando.org/blog/posts/building-rest-api-with-sutando-and-express): Building a REST API with Sutando is straightforward. In this tutorial, we'll build a complete blog API with authentication, validation, and error handling. - [Database Migrations with Sutando: A Complete Guide](https://sutando.org/blog/posts/database-migrations-with-sutando-complete-guide): Database migrations are version control for your schema. Sutando includes a powerful schema builder that lets you create and modify tables… - [Getting Started with Sutando: Build Your First Node.js App](https://sutando.org/blog/posts/getting-started-with-sutando-build-your-first-nodejs-app): New to Sutando? This tutorial walks you through everything you need to build your first Node.js application with Sutando ORM — from installation to a… - [Migrating from Laravel to Node.js: A Practical Guide with Sutando](https://sutando.org/blog/posts/migrating-from-laravel-to-nodejs-with-sutando): If you're a Laravel developer considering a move to Node.js, the biggest concern is usually leaving Eloquent behind. With Sutando, you don't have to. This… - [Model Relationships in Sutando: hasMany, belongsTo, and Beyond](https://sutando.org/blog/posts/model-relationships-in-sutando-hasmany-belongsto-and-beyond): Relationships are the heart of any ORM. Sutando brings Laravel Eloquent's relationship system to Node.js, making it easy to define and query complex data… - [Node.js Active Record ORM: A Complete Guide](https://sutando.org/blog/posts/nodejs-active-record-orm-complete-guide): The Active Record pattern is one of the most intuitive ways to interact with a database. If you've ever used Laravel's Eloquent or Ruby on Rails, you… - [Soft Deletes, Hooks, and Scopes in Sutando](https://sutando.org/blog/posts/soft-deletes-hooks-and-scopes-in-sutando): Sutando includes several powerful features that go beyond basic CRUD: soft deletes, model events (hooks), and query scopes. This guide covers all three… - [Sutando ORM: The Laravel Eloquent Experience for Node.js](https://sutando.org/blog/posts/sutando-orm-the-laravel-eloquent-experience-for-nodejs): Sutando ORM speaks the same language as Laravel’s Eloquent—methods, naming, and conventions—yet runs anywhere in the Node.js ecosystem, without tying you… - [Sutando Plugins: Extending Your ORM](https://sutando.org/blog/posts/sutando-plugins-extending-your-orm): Sutando is designed to be extensible. Whether you need custom cast types, global query modifications, or reusable model behaviors, Sutando's plugin system… - [Sutando vs Drizzle: Active Record vs SQL-First in Node.js](https://sutando.org/blog/posts/sutando-vs-drizzle-active-record-vs-sql-first): Drizzle ORM has become the go-to choice for developers who want SQL-level control with TypeScript type safety. Sutando takes the opposite approach —… - [Sutando vs Prisma: Which Node.js ORM is Right for You?](https://sutando.org/blog/posts/sutando-vs-prisma-which-nodejs-orm): Prisma is the most popular ORM in the Node.js ecosystem. But popularity doesn't mean it's the right choice for every project. In this comparison, we'll… - [Sutando vs TypeORM: A Modern Active Record Alternative](https://sutando.org/blog/posts/sutando-vs-typeorm-modern-active-record-alternative): TypeORM has been a staple in the Node.js ecosystem for years. But as TypeScript has evolved and new ORMs have emerged, TypeORM's limitations have become… - [The Best Node.js ORMs to Watch in 2026: Why Developer Experience is Making a Comeback](https://sutando.org/blog/posts/the-best-node.js-orms-to-watch-in-2026): The Node.js ecosystem in 2026 is faster and leaner than ever. With the total dominance of Edge Runtimes (Cloudflare Workers, Vercel Edge) and the rise of… - [Using Sutando with Next.js: Server-Side Database Access Made Easy](https://sutando.org/blog/posts/using-sutando-with-nextjs-server-side-database-access): Next.js App Router makes server-side database access easier than ever. With Sutando, you can query your database from Server Components and Route Handlers… ## Guide ### Introduction - [Getting started](https://sutando.org/guide/getting-started): Install Sutando, define your first model, and run queries: a tour of models, retrieving records, inserts, updates, and deletes. - [Installation](https://sutando.org/guide/installation): Install the sutando library and the driver for your database: pg or pg-native, mysql, sqlite3, tedious for MSSQL, or oracledb. ### Basics - [Query Builder](https://sutando.org/guide/query-builder): The fluent query builder creates and runs select, insert, update, and delete statements on every database Sutando supports. - [Models](https://sutando.org/guide/models): Sutando models follow the active record pattern: each database table has a model class that reads, writes, and relates its rows. - [Pagination](https://sutando.org/guide/pagination): Offset-based pagination: chain the paginate method to fetch one page of models along with totals, page counts, and ready-made page links. - [Relationships](https://sutando.org/guide/relationships): Define hasOne, hasMany, belongsTo, and many-to-many relationships as model methods, then chain query constraints on them. - [Collections](https://sutando.org/guide/collections): Every result set Sutando returns is a Collection that extends collect.js, so dozens of array helpers chain over your models. - [Mutators & Casting](https://sutando.org/guide/mutators): Accessors and mutators transform attribute values as you get or set them on a model, including casts to dates, JSON, and custom classes. - [Serialization](https://sutando.org/guide/serialization): Convert models and relationships to arrays or JSON, and control which attributes appear with the hidden and visible properties. - [Transactions](https://sutando.org/guide/transactions): Run a set of operations inside a database transaction with the connection's transaction method: exceptions roll the whole thing back. - [Database Migration](https://sutando.org/guide/migrations): Database version control: migration files create and change tables, then run through the Sutando CLI to keep every environment in sync. - [Hooks](https://sutando.org/guide/hooks): Hook into a model's lifecycle with events such as creating, created, updating, saved, deleting, restoring, and forceDeleted. - [TypeScript Support](https://sutando.org/guide/typescript): How Sutando approaches TypeScript: pragmatic types that favour an intuitive, easy-to-use API over complete type safety. - [Browser Support](https://sutando.org/guide/browser): Run Sutando in the browser: models, attributes, and relations work in the browser build, but the query builder and other database features do not. ### Plugin - [Plugin](https://sutando.org/guide/plugin): Plugins are independent packages that add new capabilities to Sutando or extend existing ones, without changing the core library. - [Plugin List](https://sutando.org/guide/plugin-list): The official Sutando plugins: SoftDeletes adds soft deletion, HasUniqueIds gives models string primary keys, and more. ## 简体中文 ### Blog #### Posts - [2026 年 Node.js ORM 选型指南:Prisma vs Drizzle vs Sutando](https://sutando.org/zh_CN/blog/posts/nodejs-orm-selection-guide-prisma-vs-drizzle-vs-sutando): Node.js 的 ORM 生态在 2026 年已经非常成熟。面对众多选择,开发者常常困惑:到底该选哪个?本文将从实际使用场景出发,对比 Prisma、Drizzle 和 Sutando 三大主流 ORM,帮你做出最佳选择。 - [2026 年值得关注的 Node.js ORM:开发者体验为何正在回归](https://sutando.org/zh_CN/blog/posts/the-best-node.js-orms-to-watch-in-2026): 2026 年的 Node.js 生态比以往任何时候都更快、更精简。随着 边缘运行时(Cloudflare Workers、Vercel Edge)的全面普及以及 Bun 成长为生产级运行时,我们与数据库交互的方式已经发生了根本性的变化。 - [Bookshelf.js 的现代替代方案:迁移到 Sutando](https://sutando.org/zh_CN/blog/posts/modern-alternative-to-bookshelfjs-migrating-to-sutando): Bookshelf.js 曾经是 Node.js 开发者的首选 ORM,它在 Knex.js 之上提供了简单、基于 Promise 的接口。但自 2022 年以来没有更新,没有 TypeScript 支持,社区也已经转移,是时候考虑现代替代方案了。本指南将带你从 Bookshelf.js 迁移到… - [Node.js Active Record ORM 完整指南](https://sutando.org/zh_CN/blog/posts/nodejs-active-record-orm-complete-guide): Active Record 是最直观的数据库交互模式之一。如果你用过 Laravel 的 Eloquent 或 Ruby on Rails,你就已经知道它有多高效。在本指南中,我们将探讨什么是 Active Record、它与其他 ORM 模式的区别,以及如何在 Node.js 中使用 Sutando… - [Node.js ORM 入门教程:用 Sutando 构建你的第一个应用](https://sutando.org/zh_CN/blog/posts/nodejs-orm-beginner-tutorial-build-first-app-with-sutando): 如果你刚开始接触 Node.js 的数据库操作,这篇教程就是为你准备的。我们将从零开始,用 Sutando 构建一个完整的应用,涵盖安装、配置、模型定义、CRUD 操作和关联查询。 - [Objection.js 的现代替代方案:迁移到 Sutando](https://sutando.org/zh_CN/blog/posts/modern-alternative-to-objectionjs-migrating-to-sutando): Objection.js 多年来一直是 Node.js 生态中流行的 ORM。基于 Knex.js 构建,它提供了灵活的、SQL 友好的数据库操作方式。但随着原作者宣布不再维护,TypeScript 支持也落后于时代,许多团队开始寻找现代替代方案。本指南将带你从 Objection.js 迁移到… - [Sutando ORM:为 Node.js 带来 Laravel Eloquent 的开发体验](https://sutando.org/zh_CN/blog/posts/sutando-orm-the-laravel-eloquent-experience-for-nodejs): Sutando ORM 与 Laravel Eloquent 一脉相承——相同的方法、命名和约定——同时可以在 Node.js 生态中的任何地方运行,无需绑定全栈框架。 - [Sutando vs Drizzle:Active Record 与 SQL 优先的对决](https://sutando.org/zh_CN/blog/posts/sutando-vs-drizzle-active-record-vs-sql-first): Drizzle ORM 已经成为追求 SQL 级别控制和 TypeScript 类型安全的开发者的首选。Sutando 则走相反的路线——将 Active Record 的优雅带入 Node.js。让我们正面对比一下。 - [Sutando vs Prisma:哪个 Node.js ORM 更适合你?](https://sutando.org/zh_CN/blog/posts/sutando-vs-prisma-which-nodejs-orm): Prisma 是 Node.js 生态中最流行的 ORM。但流行不代表适合每个项目。在这篇对比中,我们将看看 Sutando 和 Prisma 的差异,帮你做出选择。 - [Sutando vs TypeORM:更现代的 Active Record 替代方案](https://sutando.org/zh_CN/blog/posts/sutando-vs-typeorm-modern-active-record-alternative): TypeORM 在 Node.js 生态中存在多年。但随着 TypeScript 的进化和新 ORM 的涌现,TypeORM 的局限性越来越难以忽视。本文将对比 TypeORM 与 Sutando,说明为什么开发者正在切换。 - [Sutando 中的软删除、钩子和作用域](https://sutando.org/zh_CN/blog/posts/soft-deletes-hooks-and-scopes-in-sutando): Sutando 包含几个超越基础 CRUD 的强大功能:软删除、模型事件(钩子)和查询作用域。 - [Sutando 入门教程:构建你的第一个 Node.js 应用](https://sutando.org/zh_CN/blog/posts/getting-started-with-sutando-build-your-first-nodejs-app): 刚接触 Sutando?本教程将带你从安装到构建一个可用的 CRUD API,一步步上手 Sutando ORM。 - [Sutando 插件:扩展你的 ORM](https://sutando.org/zh_CN/blog/posts/sutando-plugins-extending-your-orm): Sutando 设计为可扩展的。无论你需要自定义类型转换、全局查询修改还是可复用的模型行为,Sutando 的插件系统都能满足。 - [Sutando 数据库迁移完整指南](https://sutando.org/zh_CN/blog/posts/database-migrations-with-sutando-complete-guide): 数据库迁移是表结构的版本控制。Sutando 内置强大的 Schema 构造器,可以用代码创建和修改表。 - [Sutando 模型关联指南:hasMany、belongsTo 及更多](https://sutando.org/zh_CN/blog/posts/model-relationships-in-sutando-hasmany-belongsto-and-beyond): 关联是任何 ORM 的核心。Sutando 将 Laravel Eloquent 的关联系统带入 Node.js,让定义和查询复杂数据关系变得简单。 - [从 Laravel 迁移到 Node.js:用 Sutando 无缝切换](https://sutando.org/zh_CN/blog/posts/migrate-from-laravel-to-nodejs-with-sutando): 很多 Laravel 开发者想尝试 Node.js,但舍不得 Eloquent。好消息是,Sutando 几乎完美复刻了 Eloquent 的 API,让你可以无缝切换。本文将从实际迁移角度,详细对比 Laravel 和 Node.js + Sutando 的开发体验。 - [从 Laravel 迁移到 Node.js:用 Sutando 无缝切换](https://sutando.org/zh_CN/blog/posts/migrating-from-laravel-to-nodejs-with-sutando): 如果你是 Laravel 开发者,考虑转向 Node.js,最大的顾虑通常是离开 Eloquent。有了 Sutando,你不必放弃。本指南将带你逐步迁移 Laravel 应用到 Node.js,将 Eloquent 的每个概念映射到 Sutando。 - [在 Next.js 中使用 Sutando:轻松实现服务端数据库访问](https://sutando.org/zh_CN/blog/posts/using-sutando-with-nextjs-server-side-database-access): Next.js App Router 让服务端数据库访问比以往更简单。使用 Sutando,你可以在 Server Components 和 Route Handlers 中使用同样的 Active Record API 查询数据库。 - [用 Sutando 和 Express 构建 REST API](https://sutando.org/zh_CN/blog/posts/building-rest-api-with-sutando-and-express): 用 Sutando 构建 REST API 非常简单。本教程将构建一个完整的博客 API,包含验证和错误处理。 ### 指南 #### 简介 - [开始](https://sutando.org/zh_CN/guide/getting-started): 从安装到第一个模型:了解如何使用 Sutando 定义模型、查询记录,以及插入、更新和删除数据,快速上手这个 Node.js ORM。 - [安装](https://sutando.org/zh_CN/guide/installation): 安装 sutando 库以及对应的数据库驱动:PostgreSQL 用 pg 或 pg-native,MySQL 用 mysql,SQLite 用 sqlite3,MSSQL 用 tedious。 #### 基础 - [查询构造器](https://sutando.org/zh_CN/guide/query-builder): 流畅的查询构造器可用于创建和执行查询、插入、更新与删除语句,并兼容 Sutando 支持的所有数据库系统,无需关心方言差异。 - [模型](https://sutando.org/zh_CN/guide/models): Sutando 模型基于活动记录(Active Record)模式:每张数据表都对应一个模型类,用于读写记录、定义属性并维护关联关系。 - [分页](https://sutando.org/zh_CN/guide/pagination): 基于偏移的分页:链式调用 paginate 方法获取当前页的模型,以及总数、总页数与现成的分页链接,方便在接口中直接返回。 - [模型关联](https://sutando.org/zh_CN/guide/relationships): 在模型类中以方法定义 hasOne、hasMany、belongsTo、多对多等关联,并在关联上继续链式添加查询条件、排序与预加载等能力。 - [集合](https://sutando.org/zh_CN/guide/collections): Sutando 返回的所有结果集都是 Collection 实例,继承自 collect.js 集合,因此可以像操作数组一样遍历模型集合,并用数十种方法链式处理数据。 - [属性修改器](https://sutando.org/zh_CN/guide/mutators): 访问器与修改器在读写模型属性时转换取值,包括日期、JSON、自定义类等类型的自动转换(casting),统一数据的输入与输出。 - [序列化](https://sutando.org/zh_CN/guide/serialization): 将模型与关联转换为数组或 JSON,并通过 hidden、visible 等属性控制序列化时包含哪些字段,便于构建干净、稳定的 API 响应。 - [事务](https://sutando.org/zh_CN/guide/transactions): 使用连接提供的 transaction 方法在数据库事务中执行一组操作:抛出异常时自动回滚,执行成功则自动提交,无需手动处理。 - [数据迁移](https://sutando.org/zh_CN/guide/migrations): 数据库的版本控制:用迁移文件创建、修改和回滚表结构,再通过 Sutando 命令行执行,让团队与各个环境的表结构保持同步。 - [钩子](https://sutando.org/zh_CN/guide/hooks): 通过 creating、created、updating、saved、deleting、restored 等事件,可以挂接到模型生命周期的各个节点,执行自定义逻辑。 - [TypeScript 支持](https://sutando.org/zh_CN/guide/typescript): Sutando 的 TypeScript 支持采取实用主义:在易用性与类型安全之间取得平衡,优先提供直观易用的 API 与可用的类型提示。 - [浏览器支持](https://sutando.org/zh_CN/guide/browser): 浏览器环境中也能运行 Sutando:浏览器版本支持模型、属性与关联等核心功能,但不包含查询构造器等依赖数据库的特性。 #### 插件 - [插件](https://sutando.org/zh_CN/guide/plugin): 插件是独立发布的程序包,可以为 Sutando 增加新功能或扩展既有功能,而无需改动核心库,安装后即可按需启用到项目中。 - [插件列表](https://sutando.org/zh_CN/guide/plugin-list): Sutando 官方插件列表:SoftDeletes 提供软删除,HasUniqueIds 让模型使用字符串主键,以及更多可选的扩展功能与第三方插件。 ## 日本語 ### Blog #### Posts - [2026年に注目すべき Node.js ORM:開発者体験のカムバック](https://sutando.org/ja/blog/posts/the-best-node.js-orms-to-watch-in-2026): 2026年の Node.js エコシステムは、かつてないほど高速で軽量になっています。エッジランタイム(Cloudflare Workers、Vercel Edge)の支配と、プロダクションレベルのランタイムとしての Bun の台頭により、データベースとの相互作用は根本的に変化しました。 - [Bookshelf.js のモダンな代替:Sutando への移行](https://sutando.org/ja/blog/posts/modern-alternative-to-bookshelfjs-migrating-to-sutando): Bookshelf.js はかつて、Knex.js の上にシンプルで Promise ベースのインターフェースを求める Node.js 開発者の定番 ORM でした。しかし 2022 年以降アップデートがなく、TypeScript… - [Laravel から Node.js へ:Sutando で移行する](https://sutando.org/ja/blog/posts/migrating-from-laravel-to-nodejs-with-sutando): Laravel 開発者として、Node.js への移行を検討しているなら、Sutando は最もスムーズな移行パスを提供します。このガイドでは、Eloquent から Sutando への移行を詳しく説明します。 - [Node.js Active Record ORM 完全ガイド](https://sutando.org/ja/blog/posts/nodejs-active-record-orm-complete-guide): Node.js で Active Record パターンの ORM を探しているなら、このガイドはあなたのためのものです。Active Record の基本から Sutando を使った実践的な使い方まで、すべてカバーします。 - [Objection.js のモダンな代替:Sutando への移行](https://sutando.org/ja/blog/posts/modern-alternative-to-objectionjs-migrating-to-sutando): Objection.js は長年 Node.js エコシステムで人気のある ORM でした。Knex.js の上に構築され、柔軟で SQL に近いデータベース操作を提供してきました。しかし、原作者がメンテナンスを終了し、TypeScript… - [Sutando ORM:Node.js のための Laravel Eloquent エクスペリエンス](https://sutando.org/ja/blog/posts/sutando-orm-the-laravel-eloquent-experience-for-nodejs): Node.js 向けの ORM を探しているなら、Sutando を知っておくべきです。Laravel Eloquent の開発体験を Node.js にもたらす、モダンな Active Record ORM です。 - [Sutando vs Drizzle:Active Record と SQL ファーストの対決](https://sutando.org/ja/blog/posts/sutando-vs-drizzle-active-record-vs-sql-first): Sutando と Drizzle は、Node.js の ORM として異なるアプローチを代表しています。Sutando は Active Record パターンで開発速度を重視し、Drizzle は SQL ファーストで最大限の制御を提供します。 - [Sutando vs Prisma:どの Node.js ORM が適しているか?](https://sutando.org/ja/blog/posts/sutando-vs-prisma-which-nodejs-orm): Node.js プロジェクトで ORM を選ぶ際、Sutando と Prisma は有力な候補です。この記事では、設計思想、クエリ構文、機能、そしてどのようなケースにどちらが適しているかを比較します。 - [Sutando vs TypeORM:モダンな Active Record の代替](https://sutando.org/ja/blog/posts/sutando-vs-typeorm-modern-active-record-alternative): TypeORM は長年 Node.js で最も人気のある ORM の一つでしたが、デコレーター依存やメンテナンス問題により、多くの開発者が代替を探しています。Sutando はその代替となります。 - [Sutando でデータベースマイグレーション:完全ガイド](https://sutando.org/ja/blog/posts/database-migrations-with-sutando-complete-guide): データベーススキーマの管理は、アプリケーション開発において重要な要素です。Sutando のスキーマビルダーとマイグレーション機能を使って、バージョン管理可能なスキーマ管理を実現しましょう。 - [Sutando と Express で REST API を構築する](https://sutando.org/ja/blog/posts/building-rest-api-with-sutando-and-express): Sutando と Express を使って、本格的な REST API を構築する方法を解説します。バリデーション、エラーハンドリング、リレーション、ページネーションまでカバーします。 - [Sutando と Next.js:サーバーサイドデータベースアクセス](https://sutando.org/ja/blog/posts/using-sutando-with-nextjs-server-side-database-access): Next.js App Router と Sutando を組み合わせて、サーバーコンポーネントからデータベースに直接アクセスする方法を解説します。 - [Sutando のソフトデリート、フック、スコープ](https://sutando.org/ja/blog/posts/soft-deletes-hooks-and-scopes-in-sutando): Sutando の強力な機能であるソフトデリート、モデルイベント(フック)、クエリスコープについて解説します。 - [Sutando のモデルリレーション:hasMany、belongsTo とそれ以降](https://sutando.org/ja/blog/posts/model-relationships-in-sutando-hasmany-belongsto-and-beyond): モデルリレーションは ORM の最も強力な機能の一つです。Sutando では、Laravel Eloquent ライクな直感的な API でリレーションを定義・操作できます。 - [Sutando プラグイン:ORM を拡張する](https://sutando.org/ja/blog/posts/sutando-plugins-extending-your-orm): Sutando はプラグインシステムで機能を拡張できます。独自のプラグインを作成して、モデルに新しいメソッドや機能を追加する方法を解説します。 - [Sutando 入門:最初の Node.js アプリを構築しよう](https://sutando.org/ja/blog/posts/getting-started-with-sutando-build-your-first-nodejs-app): Sutando を初めて使う?このチュートリアルでは、インストールから CRUD API の構築まで、すべてを順を追って説明します。 ### ガイド #### はじめに - [はじめに](https://sutando.org/ja/guide/getting-started): Sutando をインストールし、最初のモデルを定義してクエリを実行します。モデル、レコードの取得、挿入、更新、削除を一通り見ていきます。 - [インストール](https://sutando.org/ja/guide/installation): sutando とデータベースドライバ(PostgreSQL は pg または pg-native、MySQL は mysql、SQLite3 は sqlite3、MSSQL は tedious)のインストール手順です。 #### 基本 - [クエリビルダ](https://sutando.org/ja/guide/query-builder): Sutando の流暢なクエリビルダは、対応するすべてのデータベースで select、insert、update、delete 文を作成・実行します。 - [モデル](https://sutando.org/ja/guide/models): Sutando のモデルは Active Record パターンに基づき、各データベーステーブルに対応するモデルクラスがレコードの読み書きとリレーションを担います。 - [ページネーション](https://sutando.org/ja/guide/pagination): オフセットベースのページネーション:paginate メソッドをチェーンして、合計件数・ページ数・ページリンクと共に 1 ページ分のモデルを取得します。 - [リレーション](https://sutando.org/ja/guide/relationships): hasOne、hasMany、belongsTo、多対多のリレーションをモデルのメソッドとして定義し、クエリの制約をチェーンする方法を説明します。 - [コレクション](https://sutando.org/ja/guide/collections): Sutando が返す結果セットはすべて collect.js を継承した Collection です。多数の配列ヘルパーをモデルに対してチェーンして利用できます。 - [ミューテーター & キャスト](https://sutando.org/ja/guide/mutators): アクセサとミューテーターは、モデルの属性を取得・設定するときにその値を変換します。日付や JSON、カスタムクラスへのキャストも説明します。 - [シリアライズ](https://sutando.org/ja/guide/serialization): モデルとリレーションを配列や JSON に変換する方法と、hidden や visible プロパティで出力する属性を制御する方法を説明します。 - [トランザクション](https://sutando.org/ja/guide/transactions): 接続が提供する transaction メソッドで一連の操作をデータベーストランザクション内で実行します。例外が発生すると全体がロールバックされます。 - [データベースマイグレーション](https://sutando.org/ja/guide/migrations): データベースのバージョン管理:マイグレーションファイルでテーブルを作成・変更し、Sutando CLI で実行して、あらゆる環境のスキーマを同期させます。 - [フック](https://sutando.org/ja/guide/hooks): creating、created、updating、saved、deleting、restoring、forceDeleted などのイベントで、モデルのライフサイクルにフックできます。 - [TypeScript サポート](https://sutando.org/ja/guide/typescript): Sutando の TypeScript サポートは実用主義です。完全な型安全性よりも直感的で使いやすい API を優先し、ジェネリクスで不足を補います。 - [ブラウザサポート](https://sutando.org/ja/guide/browser): ブラウザで Sutando を実行できます。ブラウザ版ではモデル、属性、リレーションが動作しますが、クエリビルダなどのデータベース機能は含まれません。 #### プラグイン - [プラグイン](https://sutando.org/ja/guide/plugin): プラグインは Sutando に新機能を追加したり既存機能を拡張したりする独立したパッケージです。複数を組み合わせて読み込むことができます。 - [プラグイン一覧](https://sutando.org/ja/guide/plugin-list): Sutando の公式プラグイン一覧です。SoftDeletes はソフトデリートを、HasUniqueIds は文字列の主キーを提供し、ほかにも拡張があります。 ## RSS Feeds - [Sutando — Blog](https://sutando.org/blog/rss.xml) ## Agent skills - [sutando](https://sutando.org/.well-known/agent-skills/sutando/SKILL.md): Read the Sutando docs instead of answering from memory. A modern Node.js ORM, support MySQL, PostgreSQL, SQLite, MariaDB, SQL Server, Oracle, and more Use when a task involves Sutando: how it works, how to set it up or configure it, or its API. ## Agent resources - [llms-full.txt](https://sutando.org/llms-full.txt): The full Markdown of every page in one file. - [Page Markdown](https://sutando.org/index.md): Append `.md` to any page URL to fetch that page as raw Markdown. - [JSON API](https://sutando.org/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://sutando.org/openapi.json. - [Agent skills](https://sutando.org/.well-known/agent-skills/index.json): Agent Skills discovery index of the skills this site publishes. - [API catalog](https://sutando.org/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here. - [AI catalog](https://sutando.org/.well-known/ai-catalog.json): ARD manifest of the agent-facing resources on this site (MCP server, skills, APIs). - [agent-readability.json](https://sutando.org/agent-readability.json): Manifest of every agent-facing artifact on this site. - [Sitemap](https://sutando.org/sitemap.xml): Every indexable page URL with its last-modified date.