# Sea Orm

> >

- **Type:** Skill
- **Install:** `agentstack add skill-pedromneto97-custom-skills-sea-orm`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [pedromneto97](https://agentstack.voostack.com/s/pedromneto97)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [pedromneto97](https://github.com/pedromneto97)
- **Source:** https://github.com/pedromneto97/custom-skills/tree/main/skills/sea-orm

## Install

```sh
agentstack add skill-pedromneto97-custom-skills-sea-orm
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# SeaORM v2 — Skill Index

> Covers **sea-orm 2.0.0-rc** (open-source) and **SeaORM-X** (MSSQL commercial).
> Load only the reference file(s) relevant to the task. Do **not** load all files at once.

## Reference files

| Topic | File |
|-------|------|
| `Cargo.toml` dependencies, feature flags, workspace setup | `reference/01-cargo-setup.md` |
| `Database::connect`, `ConnectOptions`, pool, ping | `reference/02-connection.md` |
| Migrations — CLI, file layout, `MigratorTrait`, DDL helpers, raw SQL, seed data | `reference/03-migrations.md` |
| Entity structure — dense vs compact, attributes, CLI codegen, Rust↔DB type map | `reference/04-entity-structure.md` |
| CRUD Insert — insert one/many, `exec_with_returning`, on-conflict, IDENTITY_INSERT | `reference/05-crud-insert.md` |
| CRUD Select — find, filter, COLUMN constants, relations, pagination, partial model | `reference/06-crud-select.md` |
| CRUD Update & Delete — update one/many, delete one/many, `exec_with_returning` | `reference/07-crud-update-delete.md` |
| MSSQL-specific — savepoints, IDENTITY_INSERT, OUTPUT, schema rewrite, tuple IN | `reference/08-mssql-features.md` |
| v1 → v2 breaking changes | `reference/09-v1-v2-migration.md` |
| Repository boundary patterns — mappers, transactions, infra→domain error mapping | `reference/10-repository-patterns.md` |

## Quick decision guide

- **Starting a new project?** → load `01-cargo-setup.md` + `02-connection.md` + `03-migrations.md`
- **Defining entities?** → load `04-entity-structure.md`
- **Writing queries?** → load the relevant CRUD file(s): `05`, `06`, or `07`
- **Implementing repositories?** → load `10-repository-patterns.md` (+ relevant CRUD file)
- **Using MSSQL / SeaORM-X?** → always also load `08-mssql-features.md`
- **Upgrading from v1?** → load `09-v1-v2-migration.md`

## Key v2 concepts (quick reference)

- Use `#[sea_orm::model]` (dense format) to unlock `COLUMN` constants, auto `find_by_*`/`delete_by_*`, `ModelEx`, and Entity Loader.
- `exec_with_returning` is supported on INSERT, UPDATE, and DELETE for Postgres, SQLite, and MSSQL.
- M-N `load_many` no longer requires a junction entity in v2.
- MSSQL `IDENTITY_INSERT` is handled automatically by SeaORM-X when a PK column is `Set(...)`.
- `currentSchema` in the MSSQL connection string auto-prefixes all queries — no explicit schema annotations needed.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [pedromneto97](https://github.com/pedromneto97)
- **Source:** [pedromneto97/custom-skills](https://github.com/pedromneto97/custom-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-pedromneto97-custom-skills-sea-orm
- Seller: https://agentstack.voostack.com/s/pedromneto97
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
