SeaQL/sea-orm
77.0
Strong · 29 September 2026
108.6k
lines of production code
Rust
primary language
2
measurements over time
What this system is
SeaORM is a Rust Object-Relational Mapping library that provides an asynchronous interface for interacting with relational databases like PostgreSQL, MySQL, and SQLite. It features a code generation tool for creating type-safe entity models from database schemas, alongside a comprehensive migration system for managing schema evolution. The library supports advanced query capabilities including complex joins, keyset pagination, and dynamic runtime-typed schemas, while also offering extensions for GraphQL, gRPC, and Arrow data integration.
How it got here
2021 — SeaORM 2.0 major release
38 changes.
This period centered on the comprehensive redesign and release of SeaORM 2.0, featuring a complete API overhaul with new error handling, a rewritten entity system, and support for Apache Arrow. The work included restructuring the codebase into modular components, introducing new database drivers, and adding a CLI for migrations and code generation. Extensive testing and updated examples ensured compatibility with modern Rust standards and various web frameworks.
2022 — Example expansion and migration refactoring
37 changes.
This period focused on significantly expanding the example suite by adding complete, migration-enabled applications for multiple web frameworks including Rocket, Actix, Axum, Poem, Salvo, Tonic, and JSON-RPC. Concurrently, the core migration library was restructured to support both Tokio and async-std runtimes, introduced custom connection abstractions, and added robust CLI tooling and integration tests.
2023–2026 — Sync API, RBAC, and dynamic schemas
62 changes.
This period focused on introducing a synchronous API via the sea-orm-sync crate, enabling runtime-typed dynamic entity schemas, and implementing database-backed Role-Based Access Control. It also expanded code generation capabilities with new output formats and added extensive integration examples for frameworks like Loco and Seaography.
Features
Add Axum and SeaORM example application
Introduces a new example application in \examples/axum\_example\ that demonstrates integrating the Axum web framework with SeaORM. The example includes a complete web API with CRUD operations for posts, featuring Tera templates for the user interface, static CSS assets, and a migration system for database schema management. It also provides unit tests for the core service logic using an in-memory SQLite database.
(repo-wide) · high confidence
Add Axum-GraphQL with SeaORM example application
Introduces a new example application demonstrating an Axum-based GraphQL server integrated with SeaORM for database access. The example includes a complete project structure with a migration tool, configuration for SQLite via environment variables, and a test suite verifying CRUD operations on notes.
_examples/graphql\example · high confidence
Add GlueSQL proxy connection example
A new example in \examples/proxy\_gluesql\_example\ demonstrates how to use SeaORM's \ProxyDatabaseTrait\ to connect to a GlueSQL backend. The code implements a \ProxyDb\ adapter that translates SeaORM SQL statements into GlueSQL operations, allowing users to run SeaORM queries against GlueSQL's in-memory storage.
_examples/proxy\_gluesql\example · high confidence
Add GraphQL Note entity example with SeaORM integration
The examples/graphql\_example/entity crate now includes a concrete Note entity implementation, providing a model for notes with id, title, and text fields. This entity is integrated with SeaORM for database operations and exposes a GraphQL interface via async-graphql, including a custom find\_by\_title query method.
_examples/graphql\example/entity · high confidence
Add JSON-RPC example entity definitions for SeaORM
This change introduces the entity layer for the new jsonrpsee example, defining a \Post\ model with \id\, \title\, and \text\ fields using SeaORM. The generated code includes standard derives for equality and serialization, providing the data structure foundation for the example application.
_examples/jsonrpsee\example/entity · high confidence
Add MySQL database connectivity example with Cake entity
The issues/86 location now includes a functional example demonstrating how to connect to a MySQL database using SeaORM and perform a basic query on a 'cake' entity. The new code defines a Cake model and a main entry point that initializes tracing for debug-level logging, establishes a connection to a local MySQL instance, and executes a find operation, providing a concrete reference for integrating SeaORM with MySQL in Rust applications.
issues/86 · high confidence
Add Rocket example database migration tooling
The Rocket example now includes a dedicated migration module that manages the database schema. It defines a migration to create a 'post' table with 'id', 'title', and 'text' columns, and a subsequent migration to seed the table with two initial posts. A CLI entry point is provided to run these migrations against the database.
_examples/rocket\example/migration · high confidence
Add Rocket example entity definitions for Post
The examples/rocket\_example/entity crate now includes a new 'post' module that defines the Post entity model using SeaORM. This model includes an integer ID primary key, a title string, and a text field, with serialization/deserialization support via Rocket's serde integration. The entity is configured with the table name 'post' and implements standard SeaORM entity behaviors.
_examples/rocket\example/entity · high confidence
Add Rocket-Okapi example with Swagger and RapiDoc documentation
The examples directory now includes a Rocket-Okapi integration demo that serves API documentation via Swagger UI and RapiDoc at /swagger-ui/index.html and /rapidoc/index.html respectively. The example uses SeaORM with an in-memory SQLite database by default and provides a complete CRUD service layer with tests for creating, reading, updating, and deleting posts.
_examples/rocket\_okapi\example · high confidence
Add Rust demo application for SeaORM streaming queries
A new Rust example application has been added to the issues/471 directory, demonstrating how to use SeaORM to stream database records. The project includes a Post entity model, a setup module for creating the corresponding database table, and a main entry point that connects to a database via an environment variable, initializes the schema, and streams post records using futures\_util.
issues/471 · high confidence
Add Salvo example with SeaORM entity definitions
Introduces a new example application using the Salvo web framework, featuring SeaORM entity definitions for a 'post' model. The entity includes an integer ID, title, and text fields, generated via sea-orm-codegen 2.0.0-rc.16, providing a concrete data model for the example.
_examples/salvo\example/entity · high confidence
Add Salvo example with database migration support
The examples/salvo\_example/migration directory now includes a complete database migration setup using Sea-ORM. This adds a Migrator that executes two specific migrations: one to create a 'post' table (with id, title, and text columns) and a second to seed initial post data. The entry point allows users to run these migrations via a CLI interface, providing a concrete example of how to manage database schema and initial data within the Salvo framework context.
_examples/salvo\example/migration · high confidence
Add Seaography GraphQL example application
A new example application has been added under \examples/seaography\_example/graphql\ that demonstrates how to expose a SeaORM-backed database via a GraphQL API using the Seaography library. The example provides a complete Axum-based server (\main.rs\) that connects to a database, constructs a dynamic GraphQL schema (\query\_root.rs\), and serves a GraphQL Playground for interactive querying.
_examples/seaography\example/graphql/src · high confidence
Add Tonic gRPC example with SeaORM integration
The \examples/tonic\_example\ directory now provides a complete reference implementation for building a gRPC service using Tonic and SeaORM. It includes a \Blogpost\ service definition (proto), a server that handles CRUD operations against a SQLite database, a basic client, and unit tests for the data access layer.
_examples/tonic\example · high confidence
Add comprehensive test configuration entities and schema visualization
The \src/tests\_cfg\ directory now includes a full set of test entity definitions (such as \cake\, \fruit\, \filling\, \user\, \post\, and \comment\) supporting both compact and expanded model styles, along with a \basic\_schema.svg\ diagram. These configurations introduce support for complex relationships including many-to-many via join tables, self-referencing relations, conditional joins, and custom column name escaping for Rust keywords, providing a robust testbed for the ORM's entity and relation features.
_src/tests\cfg · high confidence
Add database migration example for the Poem application
The examples/poem\_example/migration directory now includes a complete database migration setup using SeaORM. This adds a Migrator that applies two sequential migrations: the first creates a 'post' table with id, title, and text columns, and the second seeds the table with two initial post records. A CLI entry point is provided to run these migrations against the database.
_examples/poem\example/migration · high confidence
Add database migration setup for the jsonrpsee example
The jsonrpsee example now includes a dedicated migration module that manages the database schema. This adds a migration to create a 'post' table with 'id', 'title', and 'text' columns, and a subsequent migration to seed the table with two initial posts. A CLI entry point is provided to run these migrations against the database.
_examples/jsonrpsee\example/migration · high confidence
Add generic AccountId model with SeaORM support
The issues/400 location now includes a Rust module defining a \Model\ entity that uses a new \AccountId\<T\>\ type as its primary key. This generic type wraps a UUID and uses \PhantomData\ to allow type-level distinction, implementing the necessary SeaORM traits (\TryFromU64\, \TryGetable\, \ValueType\, etc.) to map to and from database UUID columns.
issues/400 · high confidence
Add loco-todo-list example application
Introduces a new example application named 'loco-todo-list' within the examples directory. This includes the core application structure (lib.rs, app.rs) implementing the Loco framework hooks for routing, database migration, and seeding, specifically exposing a notes API endpoint at /api.
_examples/loco\example/src · high confidence
Add sea-orm DeriveIden example for identifier generation
A new example file demonstrates the use of sea-orm's DeriveIden derive macro to automatically generate string representations for enum variants (e.g., Character::Table becomes "character") and struct names (e.g., Glyph becomes "glyph"), validating the behavior through assertions.
issues/1473 · high confidence
Add support for storing UUIDs as text and timestamps as Unix integers
New value wrappers have been added to \sea-orm-sync/src/value\ to improve database compatibility, particularly for SQLite. \TextUuid\ allows UUIDs to be stored as \TEXT\ columns instead of \BLOB\, enabling easier direct database interaction and standard string-based queries. Additionally, \ChronoUnixTimestamp\ and \TimeUnixTimestamp\ (along with their millisecond variants) enable storing \DateTime\ values as \i64\ Unix timestamps, providing a more compact and index-friendly storage format for time data.
sea-orm-sync/src/value · high confidence
Add typed column implementations for Postgres arrays and various data types
This change introduces new typed column implementations in \src/entity/column/types\ to support specific data types and database features. It adds \postgres\_array.rs\ to enable Postgres-specific array operators (such as \eq\, \ne\, \contains\, \contained\, and \overlap\) for both numeric and generic array columns. Additionally, it adds dedicated column type files for \with\_datetime.rs\ (Date, Time, DateTime), \with\_ipnetwork.rs\ (IpNetwork), \with\_json.rs\ (Json), and \with\_uuid.rs\ (Uuid and TextUuid). These new types provide standard comparison operators (eq, ne, gt, gte, lt, lte), range checks (between, not\_between), aggregation functions (max, min, sum, count), null checks, and set membership checks (is\_in, is\_not\_in). For date/time, IP network, JSON, and UUID columns, the implementation also includes Postgres-specific \= ANY(..)\ support when the \postgres-array\ feature is enabled.
src/entity/column/types · high confidence
Added Actix example entity definitions for SeaORM
The examples/actix\_example/entity directory now includes generated SeaORM entity code for a 'post' model, featuring an integer ID, title, and text fields. This addition provides the data structure definitions required for the Actix web example to interact with the database using SeaORM.
(repo-wide) · high confidence
Added Loco starter example with SeaORM database migrations
The examples/loco\_starter/migration directory now includes a complete database migration setup using SeaORM. This adds a Migrator configuration that applies three sequential schema changes: creating a 'users' table (with fields for ID, email, password, API key, and verification tokens), a 'notes' table (with title and content), and a 'files' table (linked to notes via a foreign key). A CLI entry point is also provided to run these migrations against a database.
_examples/loco\starter/migration · high confidence
Added MySQL example with documentation and schema
The \examples/basic\ directory now includes a new SeaORM MySQL example, featuring a \Readme.md\ that documents setup instructions and demonstrates various query patterns (such as joins, pagination, and streaming), along with a \bakery.sql\ script to initialize the required test database tables and data.
examples/basic · high confidence
Added SeaORM entity and query example for the 'pool' table
Introduced a new example in the issues/1278 directory demonstrating SeaORM usage. The \entity.rs\ file defines a \Model\ struct for a 'pool' table with \id\ and \name\ columns, deriving standard traits including \PartialEq\ and \Eq\. The \main.rs\ file provides a functional example showing how to query this entity using \select\_only\ to map results into a custom \PoolResult\ struct and how to extract specific column values as strings using \into\_values\ with a custom \QueryAs\ enum.
issues/1278 · high confidence
Added SeaORM entity definitions and Seaography GraphQL schema for the cake/fruit domain
This change introduces the data model and API layer for the cake/fruit domain. The entity module defines SeaORM models for \cake\, \fruit\, \filling\, and the \cake\_filling\ join table, including specific relation configurations such as conditional \has\_many\ relations for tropical fruits. The GraphQL module exposes these entities via a Seaography-powered schema, registering entities with and without relations and supporting depth and complexity limits for the API.
issues/1599/entity · high confidence
Added SeaORM sync quickstart example
A new quickstart example has been added to the sea-orm-sync crate, demonstrating how to define and synchronize a relational schema using SeaORM entities. The example includes entity definitions for users, profiles, posts, comments, and tags, illustrating various relationship types such as one-to-one, one-to-many, and many-to-many (via a join table), as well as self-referential relationships. It shows how to connect to an in-memory SQLite database, automatically resolve foreign key dependencies for table creation, and perform CRUD operations with nested relations.
examples/quickstart, sea-orm-sync/examples/quickstart · high confidence
Added SeaQuery 0.28.0 compatibility example for issues/319
A new example project at issues/319 demonstrates the usage of SeaQuery 0.28.0, featuring a Rust application that connects to a MySQL database and queries a 'materials' entity. The example includes a model definition with fields for ID, timestamps, name, description, and tag IDs, serving as a reference for integrating the upgraded library version.
issues/319 · high confidence
Added database migration definitions for the Loco Seaography example
The \examples/loco\_seaography/migration\ directory now includes the source code for database schema migrations using SeaORM. This adds three specific migration steps: creating a \users\ table (with fields for ID, email, password, API key, and verification tokens), a \notes\ table (with title and content), and a \files\ table (linked to notes via a foreign key). A CLI entry point is also provided to execute these migrations against the database.
_examples/loco\seaography/migration · high confidence
Added database migration examples for Actix and Axum
The examples/actix\_example/migration and examples/axum\_example/migration directories now include a complete database migration setup using SeaORM. This adds a \Migrator\ that applies two migrations: creating a \post\ table (with \id\, \title\, and \text\ columns) and seeding it with initial data. A CLI entry point (\main.rs\) is provided in each example to run these migrations via \sea-orm-cli\.
_examples/actix\_example/migration, examples/axum\example/migration · high confidence
Added database migration for the notes table
The example application now includes a database migration that creates a 'notes' table with 'id', 'title', and 'content' columns, and provides the corresponding rollback to drop the table.
_examples/loco\example/migration · high confidence
Added database migration support for the Rocket-Okapi example
The Rocket-Okapi example now includes a dedicated migration module that manages the 'post' table schema. This addition introduces a database migration script to create the 'post' table (with id, title, and text columns) and a main entry point that automatically configures the database URL from Rocket.toml if the DATABASE\_URL environment variable is not set, ensuring the example can initialize its database state correctly.
_examples/rocket\_okapi\example/migration · high confidence
Added example application with Notes model and SeaORM entities
The example application now includes a Notes model backed by SeaORM. The diff introduces generated entity definitions for the 'notes' table (including id, title, content, and timestamps) in the \_entities module, along with a custom ActiveModelBehavior implementation in the notes module to allow for model-level logic. This provides a concrete example of how to define and use database entities within the Loco framework.
_examples/loco\example/src/models · high confidence
Added example demonstrating SeaORM active enum type mappings
Added a new example project that demonstrates how to define and use SeaORM active enums, including string-based enums with explicit length constraints (StringLen::N(1)), integer-based enums, and database-backed enum types.
issues/1143 · high confidence
Added notes controller example for the Loco todo-list app
The example application now includes a RESTful controller for managing notes, exposing endpoints to list, create, retrieve, update, and delete note resources under the /notes prefix. This adds a concrete implementation of CRUD operations using the Loco framework's routing and state management capabilities.
_examples/loco\example/src/controllers · high confidence
Added per-query execution metrics for database streams
The \src/database/stream\ module now includes a \MetricStream\ wrapper that automatically tracks and reports the elapsed time for query execution. This metric is collected for all stream-based operations, including \QueryStream\ and \TransactionStream\, across all supported database backends (MySQL, PostgreSQL, SQLite, Rusqlite, and Mock). The metrics are reported via a configurable callback when the stream is dropped, allowing users to monitor query performance without manual instrumentation.
src/database/stream · high confidence
Added service layer for post CRUD and paginated queries
The example API now includes a dedicated service module that encapsulates database operations for the Post entity. Users can now create, update, and delete individual posts, as well as delete all posts, through the Mutation service. Additionally, the Query service provides functionality to retrieve a specific post by ID and to fetch a paginated list of posts, returning both the post data and the total number of pages available.
_examples/axum\example/api/src/service · high confidence
Axum example now supports flash messages via cookies
The Axum example API now includes a flash message system, allowing users to see transient success or error notifications after actions like creating, updating, or deleting a post. This is implemented by adding a new \flash.rs\ module that handles setting and retrieving flash data via cookies, and integrating this into the main \lib.rs\ to display messages in the UI after form submissions.
_examples/axum\example/api/src · high confidence
Demo of pure crate depending on SeaORM
Added a new example application in issues/249 that demonstrates a 'pure' Rust crate depending on SeaORM. The example imports a model cloning utility from the local 'service' crate and uses SeaORM's test configuration for a 'cake' model to verify the dependency integration.
issues/249 · high confidence
Initial Actix Web 4 and SeaORM example application
Adds a new example application in \examples/actix\_example\ demonstrating an Actix Web 4 server integrated with SeaORM. The example includes a complete web interface with Tera templates, static CSS assets, and CRUD operations for managing posts, along with database migration support, configuration via \.env\, and integration tests for the core service logic.
_examples/actix\example · high confidence
Initial CLI structure with migration and codegen commands
The \sea-orm-cli\ package now exposes a structured command-line interface defined in \src/cli.rs\, introducing \Generate\ and \Migrate\ subcommands. Users can now initialize migration directories, generate new migration files (with options for UTC or local time), and manage migration states (fresh, refresh, reset, status, up, down) via the \Migrate\ command. The \Generate\ command supports entity generation with configurable formats (compact, expanded, frontend) and table filtering. The CLI reads database configuration from environment variables (\DATABASE\_URL\, \MIGRATION\_DIR\, \DATABASE\_SCHEMA\) and hides sensitive environment values in help output.
sea-orm-cli/src · high confidence
Initial RBAC entity definitions for permissions, roles, and users
This change introduces the foundational data models for the Role-Based Access Control (RBAC) system within the \src/rbac/entity\ module. It defines SeaORM entities for permissions, resources, roles, and users, along with association tables to manage role hierarchies, role-permission assignments, user-role mappings, and specific user permission overrides. These entities establish the schema structure required to enforce access control rules, such as linking users to roles and defining granular permissions on resources.
src/rbac/entity · high confidence
Initial database schema for the React Admin example
The backend migration module for the React Admin example now includes the initial database schema, defining tables for users, notes, and files. This establishes the foundational data structure required for the application's GraphQL-based admin dashboard.
_examples/react\admin/backend/migration · high confidence
Initial issue tracking model with column validation tests
Added a new \model\ module defining an \issues\ entity with \id\, \owner\, \name\, and \description\ fields, along with unit tests to verify the generated column names and table mapping.
issues/356 · high confidence
Initial release of the Rocket and SeaORM example application
Adds a new example application demonstrating how to integrate Rocket with SeaORM for database operations. The example includes a complete web interface for creating, reading, updating, and deleting posts, featuring pagination, flash messages, and template rendering. It provides configuration for PostgreSQL, MySQL, and SQLite databases, along with migration tools and unit tests for the core data access logic.
_examples/rocket\example · high confidence
Initial scaffolding for the issues/324 module with SeaORM model definition
This change introduces the initial structure for the issues/324 location, adding a main entry point and a model definition file. The model defines a \Model\ entity mapped to a database table named 'model', containing a primary key \id\ of a custom \AccountId\ type (wrapping a UUID) and a \name\ string. It also implements necessary SeaORM traits for the \AccountId\ type, including conversion to/from SeaORM values and handling of U64 conversion errors, establishing the foundational data structure for this module.
issues/324 · high confidence
Introduce RBAC feature with database-backed role management
Adds a new Role-Based Access Control (RBAC) module that authorizes database connections at the SQL level. This feature introduces dedicated database tables (permissions, resources, roles, role hierarchies, role permissions, user overrides, and user roles) and provides utilities to create these tables, load RBAC context from the database, and manage role assignments and permissions. It enables restricting database access based on user roles defined in the database schema.
src/rbac · high confidence
Introduce Role-Based Access Control (RBAC) for SeaORM
This change adds a new RBAC module to \sea-orm-sync\ that enforces access control at the SQL level. It introduces a set of database tables (\sea\_orm\_permission\, \sea\_orm\_resource\, \sea\_orm\_role\, \sea\_orm\_role\_hierarchy\, \sea\_orm\_role\_permission\, \sea\_orm\_user\_override\, \sea\_orm\_user\_role\) and an \RbacEngine\ that loads these into memory to check permissions. The system supports role hierarchies, user-specific overrides, and wildcard permissions, allowing developers to restrict database connections based on user roles and specific table/action combinations.
sea-orm-sync/src/rbac · high confidence
Introduce SeaORM entity model for the 'cake' table with case-transform tests
This change adds a new SeaORM entity definition for the 'cake' table, including fields for id, md5hash, and md5\_hash, along with a test verifying the column name case transformation behavior. A minimal main.rs entry point is also added to demonstrate connecting to a MySQL database and querying the cake entity.
issues/262 · high confidence
Introduce SeaORM-based database migrations for the GraphQL example
The GraphQL example now includes a dedicated migration module using SeaORM to manage the database schema. This adds a migration entry point that creates a 'note' table (with id, title, and text columns) and seeds it with two initial records, providing a structured way to initialize and reset the example's data store.
_examples/graphql\example/migration · high confidence
Introduce experimental schema synchronization for SeaORM entities
This change adds a new \sea-orm-sync\ module that allows users to automatically synchronize database schemas with their SeaORM entity definitions. The \SchemaBuilder\ can now register entities and execute a \sync\ operation to create missing tables, columns, unique keys, and foreign keys without dropping or altering existing structures. It supports multi-schema environments for PostgreSQL and MySQL, handles PostgreSQL enum types, and includes a JSON schema export feature for documentation or inspection. The sync process is non-destructive by design, leaving existing columns untouched if their definitions differ, and is marked as experimental and exempt from semver guarantees.
sea-orm-sync/src/schema · high confidence
Introduce sea-orm-arrow crate for Arrow-to-SeaORM conversion
The \sea-orm-arrow\ crate has been extracted and introduced as a new library component, providing functionality to convert Arrow arrays into SeaORM \Value\ types. This new module exposes an \ArrowError\ enum for handling type mismatches and out-of-range errors, and implements the \arrow\_array\_to\_value\ function to map various Arrow data types (such as integers, floats, strings, booleans, and binary data) to their corresponding SeaORM column types. It also includes feature-gated support for date/time conversions using either the \chrono\ or \time\ crates, allowing users to leverage Arrow's columnar format directly within SeaORM-based applications.
sea-orm-arrow · high confidence
Introduce unstable runtime-typed entity API
Added a new \dynamic\ module providing \Entity\, \Column\, and \Model\ types that carry schema information at runtime rather than compile time. This allows querying and mapping data for schemas that are not known at build time, including support for enum types and various database-specific features (JSON, Chrono, Time, UUID, etc.) via the \ArrayType\ mapping in \model.rs\. The module also includes \DynSelector\ to facilitate dynamic query execution and result mapping.
src/dynamic · high confidence
Introduction of synchronous SeaORM API
A new \sea-orm-sync\ crate has been added, providing a synchronous (blocking) API for database operations. This allows users to interact with SeaORM in synchronous contexts without requiring an async runtime, complementing the existing asynchronous capabilities. The crate includes core modules for error handling (\error.rs\), value serialization (\value.rs\), and metrics (\metric.rs\), along with documentation examples (\docs.rs\).
sea-orm-sync/src · high confidence
Introduction of typed column wrappers for type-safe queries
A new \types.rs\ module has been added to \src/entity/column\ that defines strongly-typed column wrappers (such as \BoolColumn\, \NumericColumn\, \StringColumn\, \UuidColumn\, and \TextUuidColumn\). These wrappers implement expression traits to provide type-safe query builders, allowing users to write queries with better compile-time checks and IDE support compared to the previous generic column definitions.
src/entity/column · high confidence
New Cloudflare Workers proxy example using SeaORM and D1
Added a new example demonstrating how to use SeaORM with Cloudflare D1 via a custom \ProxyDatabaseTrait\ implementation in a Rust Cloudflare Worker. The example includes a complete project structure with \wrangler.toml\, a \posts\ entity, and an Axum-based router that supports querying and inserting data into the D1 database.
_examples/proxy\_cloudflare\_worker\example · high confidence
New GraphQL-based Admin Dashboard example using Loco and Seaography
Added a new example in \examples/react\_admin\ that demonstrates a full-stack admin dashboard. The backend is built with Loco and Seaography, exposing a GraphQL API, while the frontend is a React application using \react-admin\ to visualize and manage data. The example includes complete project scaffolding, such as Docker Compose and devcontainer configurations for local development, CI workflows, and ESLint/Prettier settings for the frontend.
_examples/react\admin · high confidence
New Loco and Seaography integration example
Adds a new example application demonstrating how to integrate the Loco web framework with Seaography to provide a GraphQL API alongside standard REST endpoints. The example includes a complete project structure with authentication, file uploads, and background workers, along with development tooling such as Docker Compose for local services and GitHub Actions for CI.
_examples/loco\seaography · high confidence
New Loco starter example with file uploads and authentication
The \examples/loco\_starter\ directory now contains a complete REST notepad application built with Loco and SeaORM. This starter includes full user authentication (registration, login, JWT tokens, and password reset flows), a notes management API, and a new file upload feature that allows users to attach files to notes. It also provides a development environment setup via devcontainers with PostgreSQL, Redis, and a mailer service, along with CI workflows for testing and linting.
_examples/loco\starter · high confidence
New Loco with SeaORM todo list example
Added a new example application demonstrating a todo list built with Loco and SeaORM. This includes a React frontend (using Vite, React Router, and React Query) and a Rust backend, along with configuration files for development, Docker support, and code formatting.
_examples/loco\example · high confidence
New Loco-based backend with GraphQL and file uploads
The backend for the React Admin example has been rewritten using the Loco framework, introducing a GraphQL API via Seaography alongside traditional REST endpoints for notes, authentication, and file management. Users can now interact with the application through a GraphQL playground at /api/graphql, while REST routes handle user registration, login, and file uploads. The application includes built-in data seeding from YAML fixtures and background worker support.
_examples/react\admin/backend · high confidence
New Parquet example demonstrating Arrow schema generation and roundtrip
Added a new example in \examples/parquet\_example\ (and its \sea-orm-sync\ counterpart) that demonstrates generating an Arrow schema from a SeaORM entity, converting entity data to an Arrow RecordBatch, writing it to a Parquet file, reading it back, and verifying a lossless roundtrip. The example specifically highlights support for \Decimal\ and \ChronoDateTimeUtc\ types within the Arrow/Parquet integration, and concludes by inserting the restored data into a SQLite database.
_examples/parquet\_example, sea-orm-sync/examples/parquet\example · high confidence
New Rocket-Okapi example API with OpenAPI documentation
The \examples/rocket\_okapi\_example/api\ crate now provides a complete example API built on Rocket and SeaORM, featuring automatic OpenAPI specification generation via \rocket\_okapi\. Users can now access Swagger UI and RapiDoc interfaces to explore the API documentation. The example exposes standard CRUD endpoints for managing posts (create, read, update, delete) under the \/v1\ prefix, handles database connections through \rocket\_db\_pools\, and implements a structured error response format compatible with OpenAPI standards.
_examples/rocket\_okapi\example/api · high confidence
New SeaORM + Seaography example with SQLite and GraphQL
Added a new example demonstrating how to build a GraphQL-based admin dashboard using SeaORM and Seaography. The example uses SQLite as the database backend and includes a 'Bakery' schema with entities for bakeries, cakes, and bakers. It provides instructions for setting up the database, installing the necessary CLI tools, and generating the GraphQL project structure, along with sample queries for filtering and navigating relationships between entities.
_examples/seaography\example · high confidence
New build-tooling scripts and release documentation
The repository now includes a suite of shell scripts in the \build-tools/\ directory to automate and standardize the release process and local development setup. \bump.sh\ handles version bumps across all workspace crates and examples while normalizing TOML formatting with \taplo\. \publish.sh\ enforces the correct dependency order for publishing to crates.io, and \RELEASE.md\ provides a detailed checklist for release candidates, including instructions for tagging and publishing prebuilt \sea-orm-cli\ binaries. Additional scripts like \make-sync.sh\ (refactors async code for the sync crate), \docker-create.sh\ (spins up local database services), and \clean.sh\ streamline contributor workflows.
build-tools · high confidence
New code generation formats and ER diagram support
The code generator now supports multiple output styles via new writer modules: 'compact' (generating a single Model struct with a Relation enum), 'dense' (generating relation fields directly on the Model struct), 'frontend' (generating lightweight models with correct external type imports for JSON, dates, etc.), and 'mermaid' (generating ER diagrams from entity definitions). This allows users to choose the generated code structure that best fits their project needs, such as simpler models for frontend consumption or visual documentation of database relationships.
sea-orm-codegen/src/entity/writer · high confidence
New database driver implementations and mock infrastructure in sea-orm-sync
The \sea-orm-sync\ crate now includes full driver implementations for MySQL, PostgreSQL, and SQLite via SQLx, as well as a dedicated driver for the \rusqlite\ library, enabling synchronous database access across these backends. This change introduces a \MockDatabase\ driver for testing and a \ProxyDatabase\ driver for intercepting calls, alongside a shared connection model for \rusqlite\ that supports nested transactions and connection pooling semantics. Additionally, the SQLite driver now validates the database version to ensure support for the \RETURNING\ clause when the \sqlite-use-returning-for-3\_35\ feature is enabled.
sea-orm-sync/src/driver · high confidence
New executor module with keyset pagination, multi-entity joins, and delete returning
The \sea-orm-sync/src/executor\ module has been introduced, providing the core execution logic for database operations. This includes a new \Cursor\ struct for keyset pagination (filtering by order columns instead of LIMIT/OFFSET) and a \set\_page\ method on the \Paginator\. The module adds support for complex multi-entity joins up to six entities (\SelectFive\, \SelectSix\) with a new \consolidate\ function to handle star-topology result sets, and introduces \exec\_with\_returning\ for DELETE operations to retrieve deleted models where the backend supports it. It also adds a \require\_one\ fetch method that errors if no rows are found.
sea-orm-sync/src/executor · high confidence
New mock, proxy, and rusqlite database drivers
The driver module now includes three new database backends: a MockDatabase driver for testing without a real database, a ProxyDatabase driver for intercepting and mocking database calls in async contexts, and a Rusqlite driver for synchronous SQLite access. The existing SQLx-based drivers (MySQL, PostgreSQL, SQLite) have been refactored to use a common \sqlx\_common\ module for pool options and error mapping, and now support advanced connection lifecycle hooks like \before\_acquire\ and idle-ping shorthands. The \mod.rs\ file exposes these new drivers behind feature flags (\mock\, \proxy\, \rusqlite\), allowing users to opt into these capabilities without pulling in unnecessary dependencies.
src/driver · high confidence
New resumable Pi Spigot example with SQLite checkpointing
Added a new example demonstrating how to make long-running computations resumable using SeaORM and SQLite. The \pi\_spigot\ example implements the Rabinowitz-Wagon algorithm with a state-machine pattern, allowing users to pause and resume the computation via periodic database checkpoints. It includes a CLI for configuring the number of digits, checkpoint interval, and database path, along with a \run\_log\ entity to track final results. A separate \quickstart\ example was also added for minimal setup using in-memory SQLite.
sea-orm-sync/examples · high confidence
New runtime-typed dynamic entity API in sea-orm-sync
The \sea-orm-sync\ crate now exposes a \dynamic\ module that allows working with database schemas at runtime rather than requiring compile-time generated types. This new API includes \Entity\, \Column\, and \Model\ structs that carry schema information dynamically, enabling queries and model conversions for tables whose structure is not known until execution. The implementation includes support for mapping various data types (including enums, decimals, and timestamps) to runtime values and provides execution helpers like \select\_also\_dyn\_model\ to fetch both static and dynamic model representations in a single query.
sea-orm-sync/src/entity · high confidence
New schema module for entity-to-database schema generation and synchronization
A new \src/schema\ module has been added, introducing \Schema\ and \SchemaBuilder\ to generate \CREATE TABLE\, \CREATE TYPE\, and index statements directly from SeaORM entities. This includes a \sync()\ method (behind the \schema-sync\ feature) that compares registered entities against the database and creates missing tables, columns, unique keys, and foreign keys without dropping or altering existing structures. The module also supports generating JSON schema descriptions via \json\_schema\_from\_entity\ and handles PostgreSQL-specific features like enums and non-default schemas.
src/schema · high confidence
New value wrappers for storing UUIDs as text and datetimes as Unix timestamps
This change introduces new wrapper types in the value module to control how specific data types are persisted in the database. Users can now use \TextUuid\ to store UUIDs as \TEXT\ columns instead of the default \BLOB\, which improves compatibility with SQLite and enables simpler querying. Additionally, new types \ChronoUnixTimestamp\ and \ChronoUnixTimestampMillis\ (for the \chrono\ crate) and \TimeUnixTimestamp\ and \TimeUnixTimestampMillis\ (for the \time\ crate) allow storing \DateTime\ values as Unix timestamps (\i64\) in seconds or milliseconds, providing a stable and efficient storage format for temporal data.
src/value · high confidence
Repository restructured for SeaORM 2.0 with new documentation and tooling
The repository has been reorganized to support the SeaORM 2.0 release. This includes adding a comprehensive \CLAUDE.md\ guide for AI-assisted development, a new \COMMUNITY.md\ showcasing projects built with SeaORM, and updated \README.md\ and \README-zh.md\ reflecting the new 2.0 entity format and features. Tooling configuration files \.gitattributes\, \.rustfmt.toml\, and \.taplo.toml\ have been added to standardize formatting and language detection. The legacy \bakery.sql\ example file was removed, and \.gitignore\ was updated to exclude more IDE and environment-specific files.
(repo-wide) · high confidence
Seaography example migration scaffolding and seed data
The migration module for the Seaography example now includes a complete database schema and seed data. It defines entities for bakeries, bakers, cakes, and their many-to-many relationships, along with migration scripts to create the corresponding tables. A seed migration populates the database with sample data, including two bakeries, two bakers, and various cake types. The setup also includes a README with instructions for running migrations and a main entry point for the CLI.
_examples/seaography\example/migration · high confidence
Support for composite primary keys with up to six columns
The library now supports defining composite primary keys consisting of up to six columns. This is demonstrated by new entity models in the issues/352 directory that define primary keys using combinations of i32, String, f64, Uuid, DateTime, and DateTimeWithTimeZone fields, allowing users to map database tables with complex multi-column primary keys.
issues/352 · high confidence
Architecture
Refactored entity code generation into modular component structs
The entity code generation logic in \sea-orm-codegen\ has been restructured from a monolithic implementation into distinct, focused modules (\active\_enum\, \base\_entity\, \column\, \conjunct\_relation\, \primary\_key\, \relation\, \transformer\, \writer\). This change introduces dedicated structs for handling specific database concepts—such as \ActiveEnum\ for enum generation, \Column\ for type mapping and definitions, and \Relation\ for foreign key and association logic—making the codebase more maintainable and easier to extend. The \EntityWriter\ now orchestrates these components to produce entity files in various formats (compact, expanded, dense, frontend), ensuring that generated Rust code correctly maps database schemas to idiomatic Rust types and relationships.
sea-orm-codegen/src/entity · high confidence
Behavioural changes
Actix example API refactors core logic into a dedicated service module
The Actix example API has been restructured to separate business logic from the web layer. Database operations (queries and mutations) are now encapsulated in a new \service\ module (\src/service/\), while \src/lib.rs\ handles HTTP routing, state management, and template rendering. This change improves code organization and makes it easier to mock or test the core implementation independently of the web framework.
_examples/actix\example/api · high confidence
Add basic Sea-ORM example with Tokio runtime
The basic example in \examples/basic/src\ has been updated to use the Tokio asynchronous runtime. The entry point now uses \\#\[tokio::main\]\ to drive the async execution of database queries and mutations, replacing the previous runtime implementation. This change ensures the example runs correctly with modern async Rust standards while demonstrating Sea-ORM's query and mutation capabilities.
examples/basic/src · high confidence
Added workaround for column name mapping in SeaORM entity generation
The issues/630 example now includes a generated entity module that demonstrates a workaround for handling column names containing underscores. While the standard \DeriveEntityModel\ macro is used, the \underscores\_workaround\ module explicitly applies \\#\[sea\_orm(column\_name = "...")\]\ attributes to fields like \a\_b\_c\_d\ to ensure correct mapping to database columns, contrasting with the \underscores\ module which relies on default naming conventions. This addition clarifies how to manually override column names when automatic derivation might be ambiguous or incorrect.
issues/630 · high confidence
CLI command implementations for entity generation and migration management
The \sea-orm-cli\ now includes concrete command handlers for generating entities and managing migrations. The \generate\ command supports advanced options such as custom derives and attributes for models, enums, and columns, allows preserving user modifications to generated files, handles SQLite generated columns by skipping them, and supports PostgreSQL schema search paths and specific table filtering. The \migrate\ command provides subcommands for initializing migration directories, generating new migration files with validated names (rejecting hyphens), and running migrations via the \sea-orm-migration\ crate, with support for universal time formatting and verbose output.
sea-orm-cli/src/commands · high confidence
Escape Rust keywords in generated entity code
The code generator now automatically escapes Rust reserved keywords (such as 'async', 'await', 'self', 'crate', etc.) when generating entity code. This prevents compilation errors when database column names or table names conflict with Rust language keywords, ensuring that generated code remains valid and compilable regardless of naming conventions used in the database schema.
sea-orm-codegen/src · high confidence
Executor module restructured with new consolidation, cursor pagination, and returning clauses
The \src/executor\ module has been reorganized into distinct files (\consolidate\, \cursor\, \delete\, \execute\, \insert\, \paginator\, \query\, \returning\, \select\) to improve modularity. This change introduces a \consolidate\ module that efficiently groups query results for multi-entity joins (up to six entities) using primary key arity optimization. It adds a \Cursor\ struct for keyset pagination, which filters by order columns instead of using LIMIT/OFFSET for better performance on large datasets. The \delete\ and \insert\ modules now support \exec\_with\_returning\ methods, allowing users to retrieve deleted or inserted models directly from the database where supported. The \paginator\ module exposes \num\_items\_and\_pages\ for total counts and \set\_page\ for manual page navigation. The \execute\ module standardizes \ExecResult\ handling across different database backends (SQLx, Rusqlite, Mock, Proxy).
src/executor · high confidence
Expanded multi-table join capabilities and query builder refactoring
The query module now supports joining up to five entities in a single query via new types like SelectFour and SelectFive, including a 'star topology' mode that consolidates results under a central entity. The module has been restructured into dedicated files for select, insert, delete, join, and loader operations, introducing a new DebugQuery type for backend-specific SQL rendering and a TryInsert builder for idempotent upserts. Additionally, linked joins now respect the configured condition type, and the has\_related filter correctly handles complex conditions.
sea-orm-sync/src/query · high confidence
Internal refactoring of strum macro helper modules
The internal helper modules for the strum macro integration in \sea-orm-macros\ have been restructured and updated. This change introduces a new \case\_style.rs\ module to handle string case conversions (e.g., camelCase, snake\_case) using the \heck\ library, replaces the previous \sea-strum\ dependency with the original \strum\ crate, and updates the macro codebase to be compatible with \syn v2\ and Rust Edition 2024. These are internal implementation details that do not alter the public API or user-facing behavior of SeaORM.
sea-orm-macros/src/strum/helpers · medium confidence
Internal strum module adapted for EnumIter generation
The \sea-orm-macros\ crate now includes an adapted copy of the \strum\ library's source code (specifically \enum\_iter.rs\ and \helpers\) to provide its own \EnumIter\ implementation. This change replaces the previous dependency on the external \sea-strum\ crate, embedding the necessary macro logic directly into SeaORM to support iterating over enum variants without external runtime dependencies for this specific feature.
sea-orm-macros/src/strum · high confidence
Introduce unified database connection and execution abstractions
This change restructures the database layer by introducing \ConnectionTrait\ and \StreamTrait\ to standardize how queries and streaming results are executed across all connection types, including real pools, transactions, mocks, and proxies. It adds \DatabaseExecutor\ as a unified handle that accepts borrowed connections, borrowed transactions, or owned transactions, simplifying API usage for components like migrations. Additionally, \ConnectOptions\ is expanded with new configuration fields for connection pooling (e.g., \max\_lifetime\, \idle\_timeout\), SQLx logging control, and lazy connection support, while \TransactionOptions\ now allows explicit configuration of isolation levels, access modes, and SQLite-specific transaction modes.
src/database · high confidence
Major entity system redesign with ActiveModelEx and Arrow support
The entity module has been completely rewritten to introduce a new entity model system. This includes the addition of \ActiveModelEx\ for nested relation mutations (allowing \HasOne\/\HasMany\ relations to be saved alongside the parent model), a new \ActiveEnum\ trait for database-level enum support, and integration with Apache Arrow for reading/writing \RecordBatch\es via \from\_arrow\ and \to\_arrow\ methods. The \ActiveValue\ state machine has been refined with \Unchanged\ and \NotSet\ states to improve partial update semantics, and the \ColumnDef\ builder API now replaces the previous \ColumnType\ enum for schema definitions.
src/entity · high confidence
Migration status queries now support read-only database users
The migration system now provides read-only variants for checking migration status (e.g., \get\_pending\_migrations\_read\_only\). These methods probe the database using information-schema queries instead of attempting to create the migration tracking table, allowing users without DDL privileges to check pending or applied migrations. Additionally, the \drop\_everything\ command now explicitly drops PostgreSQL custom types alongside tables and foreign keys to ensure a complete database reset.
sea-orm-migration/src/migrator · high confidence
New SeaORM-based migration system for the Tonic example
The Tonic example now uses a dedicated migration crate to manage database schema and seed data. This introduces a new migration workflow where the schema is defined using SeaORM's migration traits, including a migration to create the 'post' table and a subsequent migration to seed it with initial data. Users will now run migrations via a CLI tool integrated into the example, replacing any previous manual or ad-hoc database setup methods.
_examples/tonic\example/migration · high confidence
New \`raw\_sql\` macro and \`DeriveEntityModel\` consolidation
The \sea-orm-macros\ crate now exposes a \raw\_sql\ proc-macro that allows users to construct database statements for specific backends (MySQL, PostgreSQL, SQLite) directly in code. Additionally, the \DeriveEntityModel\ macro has been consolidated to automatically generate \DeriveModel\ and \DeriveActiveModel\ implementations, simplifying entity definitions by reducing the number of required derive attributes.
sea-orm-macros/src · high confidence
New lazy-loading wrappers for HasOne, HasMany, and BelongsTo relations
The \src/entity/compound\ module now introduces dedicated \HasOne\, \HasMany\, and \BelongsTo\ types that wrap related models in an \Unloaded\ or \Loaded\ state. This change allows users to access associated data lazily, avoiding unnecessary database queries until the relation is explicitly accessed. The new types provide methods like \is\_loaded\, \as\_ref\, and \into\_option\ to safely interact with the relationship state, and include serialization support for \HasOne\ when the \with-json\ feature is enabled.
src/entity/compound · high confidence
Preserve user modifications during entity generation
The code generation process now merges user-added attributes and custom implementations into regenerated entity files instead of overwriting them. When generating code, the system extracts existing custom attributes from the \Model\ struct and \Relation\ enum, as well as any active model behavior implementations, and re-applies them to the newly generated structures. This ensures that manual edits, such as custom derives or documentation comments, are retained across regeneration cycles.
sea-orm-codegen/src/merge · high confidence
RBAC engine introduces role hierarchy, wildcard support, and unrestricted mode
The RBAC engine in \src/rbac/engine\ has been restructured to support a role hierarchy, allowing users to inherit permissions from parent roles via a non-recursive tree walk that safely handles cyclic references. It now supports wildcard resources and permissions, enabling broad access rules, and includes a \danger\_unrestricted()\ snapshot method that grants \UserId(0)\ full access to all actions and resources as an escape hatch. The engine loads a consistent snapshot from the database using a read-only transaction and exposes APIs to retrieve user roles, permissions, and role ranks.
src/rbac/engine · high confidence
Refactor GraphQL example to separate service logic from API layer
The GraphQL example API has been restructured to decouple business logic from the web interface. Database access is now encapsulated in a dedicated \Database\ struct, and core data operations (queries and mutations) are implemented in a \service\ module. The GraphQL layer (\graphql/\) now acts as a thin wrapper that retrieves the database connection from the context and delegates to these service functions, making the example easier to test and understand.
_examples/graphql\example/api · high confidence
Refactor JSON-RPC example to separate service logic from API layer
The \examples/jsonrpsee\_example/api\ crate has been restructured to separate business logic from the RPC interface. The previous \core\ module has been renamed to \service\, containing distinct \Mutation\ and \Query\ structs in \service/mutation.rs\ and \service/query.rs\ that handle database operations via SeaORM. The main \lib.rs\ now implements the \PostRpc\ trait, delegating calls to these service modules, and uses \dotenvy\ for environment configuration. This change improves testability by isolating the core implementation from the web API layer.
_examples/jsonrpsee\example/api · high confidence
Refactor Poem example API to separate service logic from web handlers
The Poem example API has been restructured to decouple business logic from the web layer. Database operations (mutations and queries) are now encapsulated in a dedicated \service\ module, while \lib.rs\ contains only HTTP handlers and routing. This separation clarifies the application structure and makes it easier to mock or replace the data layer for testing purposes.
_examples/poem\example/api · high confidence
Refactor Rocket example to separate API routes from business logic
The \examples/rocket\_example/api\ crate has been restructured to decouple the web interface from data operations. The \core\ crate was renamed to \service\, and the codebase now explicitly separates concerns: \api/src/lib.rs\ handles Rocket route definitions and HTTP responses, while \api/src/service/\ contains the \Mutation\ and \Query\ structs that encapsulate SeaORM database interactions. This change improves testability by allowing the service layer to be mocked independently of the web API.
_examples/rocket\example/api · high confidence
Renamed core crate to service in examples and issue 249
The \core\ crate within the \examples/rocket\_okapi\_example\ directory has been renamed to \service\, and a corresponding \service\ crate has been added to the \issues/249\ directory. This change reorganizes the project structure by updating the crate name, while the underlying functionality for handling database mutations and queries remains intact within the new \service\ location.
_examples/rocket\_okapi\example/service, issues/249/service · low confidence
Restructured migration library with new CLI and connection abstractions
The \sea-orm-migration\ crate has been restructured to provide a more modular and configurable migration experience. A new CLI module (\cli.rs\) exposes entry points like \run\_cli\ and \run\_cli\_with\_connection\, allowing users to customize database connection logic (e.g., loading extensions or using custom config sources) rather than relying solely on environment variables. The library now introduces \SchemaManagerConnection\ and \IntoSchemaManagerConnection\ abstractions (in \connection.rs\ and \manager.rs\) to unify how migrations interact with the database, supporting both owned connections and transactions. Additionally, the \MigratorTrait\ now includes read-only status queries (\get\_migration\_with\_status\_read\_only\) that skip \CREATE TABLE\ operations, enabling migration status checks for users without DDL privileges.
sea-orm-migration/src · high confidence
Restructured query module with new multi-entity join types and debug macros
The \src/query\ module has been reorganized into distinct files (combine, debug, delete, helper, insert, join, loader, select, update) to improve code maintainability. This change introduces new type-safe join structures (\SelectTwo\, \SelectThree\, \SelectFour\, etc.) that allow selecting and joining multiple entities in a single query, supporting both star and chain topologies. It also adds \debug\_query!\ and \debug\_query\_stmt!\ macros for generating raw SQL strings for debugging purposes, and refactors the loader and delete/insert builders for better error handling and API consistency.
src/query · high confidence
Salvo example API refactors service layer and updates dependencies
The Salvo example API has been restructured to separate business logic from the web handlers, moving database operations into a dedicated \service\ module (containing \Mutation\ and \Query\ structs) while the \api\ crate now only defines HTTP handlers and routing. This change also updates the example to use Rust Edition 2024, switches the environment variable loading library from \dotenv\ to \dotenvy\, and aligns dependencies with the latest versions of the Salvo web framework and SeaORM.
_examples/salvo\example/api · high confidence
SeaORM 2.0: Major API overhaul with new error handling, metrics, and async runtime support
This release introduces a comprehensive redesign of the SeaORM core API. The error handling system has been completely reworked, replacing the previous \ExecErr\ and \QueryResult\ structures with a new, exhaustive \DbErr\ enum in \src/error.rs\ that provides granular error types (such as \ConnectionAcquire\, \RecordNotInserted\, and \BackendNotSupported\) and integrates with \thiserror\. The library has shifted to a new async foundation, requiring the \smol\ runtime for integration tests and utilizing \smol\_potat\ for doctests, while the old \executor.rs\ and \query.rs\ modules have been removed. A new metrics subsystem (\src/metric.rs\) allows users to register callbacks to track query execution duration and failure status. Additionally, the \debug\_print\ macro in \src/util.rs\ has been updated to use the \tracing\ crate instead of \println!\ when the \debug-print\ feature is enabled, and new default value traits (\DefaultActiveValue\) have been added to \src/value.rs\.
src · high confidence
SeaORM derive macros rewritten for v2.0
The derive macros in \sea-orm-macros/src/derives\ have been completely rewritten to support the SeaORM v2.0 architecture. This change introduces new derive macros such as \DeriveActiveModel\, \DeriveEntity\, and \DeriveActiveEnum\, replacing the previous implementation. Users will now benefit from a more robust macro system that includes support for Arrow/Parquet schemas via \DeriveArrowSchema\, improved handling of self-referencing relations in \DeriveActiveModelEx\, and better type safety with fully qualified paths. The rewrite also standardizes attribute parsing using the \bae\ crate and introduces new case-style handling for enum variants and column names.
sea-orm-macros/src/derives · high confidence
Seaography example now includes Baker and Cake-Baker relationship entities
The Seaography example application has been updated to include new entity definitions for 'baker', 'bakery', 'cake', and the join table 'cake\_baker'. These generated SeaORM entities establish a more complex data model where bakers belong to bakeries, cakes belong to bakeries, and a many-to-many relationship exists between bakers and cakes via the 'cake\_baker' table. This change expands the example's schema to demonstrate handling of these specific relationships and types (including Decimal and Double column types) within the GraphQL layer.
_examples/seaography\example/graphql/src/entities · high confidence
Support for both async-std and tokio runtimes in CLI entry point
The CLI binary now supports being built against either the async-std or tokio runtime, determined by the enabled feature flags. This allows users to choose their preferred async runtime for the command-line tool, with the main function delegating to the core CLI logic once the runtime is initialized.
sea-orm-cli/src/bin · high confidence
Support for concurrent database queries in issues/892 example
The example code in issues/892 now demonstrates executing a database query within a spawned Tokio task. Specifically, it connects to an in-memory SQLite database and performs a reverse inner join between the 'cake' and 'cake\_filling' entities using \RelationDef\, ensuring that the relation definition is safe to use across async task boundaries.
issues/892 · high confidence
Support for custom primary key column names in entity relationships
The library now allows entities to define a primary key that maps to a database column with a different name than the Rust struct field (e.g., \rust\_id\ mapping to \db\_id\). This is demonstrated in the \issues/693\ example, where the \Container\ entity uses \\#\[sea\_orm(primary\_key, column\_name = "db\_id")\]\ and the \Content\ entity correctly joins on this custom column name via \from = "crate::ContentColumn::ContainerId"\ and \to = "crate::ContainerColumn::RustId"\, ensuring generated SQL references the actual database column rather than the Rust field name.
issues/693 · high confidence
Synchronized database layer with SQLite transaction modes and streaming support
The database module in \sea-orm-sync\ has been synchronized to align with the main SeaORM codebase, introducing support for SQLite transaction modes (Deferred, Immediate, Exclusive) via \TransactionOptions\, enabling row-by-row result streaming behind a \stream\ feature flag, and adding a \RestrictedConnection\ wrapper for RBAC-based query authorization. The \DatabaseConnection\ type now explicitly supports \rusqlite\ alongside SQLx drivers, and tracing spans can be configured to optionally disable SQL argument recording.
sea-orm-sync/src/database · high confidence
Typed column wrappers and feature-gated implementations for query expressions
The \sea-orm-sync\ column module now exposes strongly-typed column wrappers (such as \BoolColumn\, \NumericColumn\, \StringColumn\, \JsonColumn\, \UuidColumn\, and \TextUuidColumn\) that implement expression traits, allowing users to use these columns directly in query builders with type-safe operators. The change also introduces feature-gated implementations for specific data types: \with-chrono\ and \with-time\ enable date/time-like column operations, \with-uuid\ adds UUID-specific comparisons, \with-json\ provides JSON column operators, \with-ipnetwork\ supports IP network columns, and the \postgres-array\ feature enables array-specific operations like \contains\ and \overlap\ for numeric and generic columns.
sea-orm-sync/src/entity/column · high confidence
Updated basic example to use SeaORM 0.1.0 with new entity definitions
The basic example has been updated to use SeaORM codegen version 0.1.0, introducing new entity definitions for cake, fruit, filling, and their relationships. The entities now include explicit table name mappings, primary key configurations, and relationship attributes such as HasMany and BelongsTo with cascade rules. A new active enum 'Tea' has also been added to demonstrate enum support in the example.
examples/basic/src/entity · high confidence
Updated migration template to Rust 2024 and Tokio
The migration project template now targets Rust Edition 2024 and requires Rust 1.85.0, replacing the previous async-std runtime with Tokio. The template's Cargo.toml has been updated to depend on the tokio crate with macros, rt, and rt-multi-thread features, and a .gitignore file has been added to exclude the target directory. Documentation in the migration README has also been refreshed to reflect these changes.
sea-orm-cli/template · high confidence
Updated migration template to use tokio and simplified structure
The migration project template now uses tokio as the async runtime instead of async-std, and the main entry point has been simplified to directly run the CLI with the Migrator. The library structure has been reorganized to use sea\_orm\_migration::prelude, and the default migration script now includes a sample table creation for 'post' with id, title, and text columns, along with a corresponding drop operation.
sea-orm-cli/template/migration · high confidence
sea-orm-rocket updated for Rocket 0.5.1 compatibility
The sea-orm-rocket integration has been updated to support Rocket 0.5.1. This change includes a new code generation crate (\sea\_orm\_rocket\_codegen\) that provides a \\#\[derive(Database)\]\ macro for simplifying database pool setup, a refactored \Pool\ trait that requires \Sync\ connections to improve concurrency handling, and a configurable \sqlx\_logging\ option in the database configuration.
sea-orm-rocket · high confidence
Test coverage
Added bakery chain test schema and seed data; Added comprehensive CRUD integration tests for the bakery chain domain; Added dense-format entity tests for bakery and sakila schemas; Added example schemas and test cases for specific database issues; Added integration tests for Seaography GraphQL queries; Added integration tests for migration status, schema handling, and PostgreSQL extension safety; Added test case for non-auto-increment primary keys in SeaORM; Added test configuration entities for sea-orm-sync; Added test fixtures for SeaORM entity models; Added test fixtures for code generation edge cases; Added test fixtures for compact, dense, and expanded entity generation modes; Added test fixtures for migrator configuration and transaction control; Added test infrastructure for database setup and schema creation; Added test infrastructure for integration tests; Added test migrations for transaction control and schema operations; Added tests for composite foreign key relationships; Added tests for derive macro edge cases and behaviors; Added tests for nested partial model aliases and prefixes; Expanded test coverage for ActiveEnum, Arrow integration, and legacy belongs\_to relations; Expanded test coverage for sea-orm-sync; Expanded test suite for entity models and schema generation.
Dependencies
Examples updated to SeaORM 2.0.4 and Rust Edition 2024
The example projects (actix, axum, basic, graphql, jsonrpsee, loco, and loco\_seaography) have been updated to use SeaORM version \~2.0.4 and the Rust 2024 edition. This includes updating the minimum Rust version requirement to 1.85.0 or 1.94.0 depending on the example, and adjusting dependencies such as axum to 0.8 and async-graphql to 7.0 where applicable.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 72 → 77 (+5.3)
- Rubric changed (rubric-2026.09.8 → rubric-2026.09.17) — scores are not directly comparable.
Lenses
- Code Health 82 → 81 (-0.0)
- Architecture 100 → 98 (-2.1)
- Maturity 75 → 75 (+0.1)
- Readiness 80 → 77 (-3.7)
- Security 62 → 74 (+12.1)
- Domain Modelling 100 → 100 (+0.0)
- Performance 100 (new)
Resolved (18)
- Documentation: no installation or build instructions (README.md)
- Documentation: no installation or build instructions (examples/basic/Readme.md)
- Documentation: no licence statement
- Documentation: no usage examples (examples/basic/Readme.md)
- Duplicated block (24 lines × 2) (sea-orm-sync/src/entity/link.rs)
- Duplicated block (9 lines × 2) (sea-orm-sync/src/entity/column.rs)
- Duplicated block (9 lines × 2) (sea-orm-sync/src/entity/column.rs)
- Edited copy of a member (21 corresponding lines) (sea-orm-sync/src/schema/builder.rs)
- High: security finding (details withheld)
- Hotspot: sea-orm-codegen/src/entity/column.rs (sea-orm-codegen/src/entity/column.rs)
- Hotspot: sea-orm-codegen/src/entity/writer/dense.rs (sea-orm-codegen/src/entity/writer/dense.rs)
- Hotspot: sea-orm-macros/src/derives/active_enum.rs (sea-orm-macros/src/derives/active_enum.rs)
- Hotspot: sea-orm-macros/src/derives/util.rs (sea-orm-macros/src/derives/util.rs)
- Hotspot: sea-orm-sync/src/entity/active_model.rs (sea-orm-sync/src/entity/active_model.rs)
- Hotspot: src/entity/active_model.rs (src/entity/active_model.rs)
- Hotspot: src/error.rs (src/error.rs)
- Members sharing a duplicated core (4 members, 50+ identical tokens) (sea-orm-sync/src/entity/column.rs)
- Off-boarding risk: anonymized user #1
New (17)
- Confusingly named operations: from_json and set_from_json likely perform similar JSON deserialization into the model. The distinction is unclear from the signature alone.
- Dependency hygiene PARTLY measured — Cargo dependencies read, no committed lock to grade for currency
- Duplicate intent: execute and exec_stmt appear to be synonyms for executing a SQL statement. Having two methods with different names for the same action is confusing.
- Duplicated block (28 lines × 2) (sea-orm-sync/src/entity/link.rs)
- Duplicated block (5 lines × 2) (sea-orm-sync/src/entity/column.rs)
- Duplicated block (5 lines × 2) (sea-orm-sync/src/entity/column.rs)
- Duplicated block (8 lines × 2) (sea-orm-sync/src/query/select.rs)
- Edited copy of a member (21 corresponding lines) (sea-orm-sync/src/schema/builder.rs)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Members sharing a duplicated core (4 members, 50+ identical tokens) (sea-orm-sync/src/entity/column.rs)
- Off the main sequence: entity (issues/1599/entity)
- Off the main sequence: sea-orm-codegen
- Off-boarding risk: anonymized user #1
- Redundant/Confusingly named operations: arrow_array_to_value and arrow_array_to_value_alt have identical signatures and likely perform the same core conversion, with alt being a fallback or variant. This creates ambiguity for users on which to use.
- Split sea-orm-sync
- Type duplication: MigratorTraitSelf and MigratorTrait expose identical method signatures for querying migration status (get_migration_with_status, get_pending_migrations, get_applied_migrations). This suggests one trait is redundant or they are meant to be implemented together but are exposed as separate public types causing confusion.
Changes since last survey
- 28 commits — 23 feature/other, 5 fixes
By area
- (root) — 5 commits
- sea-orm-sync/src — 5 commits
- changelog/2.0.4.md — 3 commits
- (repo) — 2 commits
- .github/workflows — 2 commits
- examples/actix_example — 2 commits
- sea-orm-macros/src — 2 commits
- build-tools/RELEASE.md — 1 commit
- changelog/2.0.3.md — 1 commit
- examples/seaography_example — 1 commit
- sea-orm-cli/README.md — 1 commit
- sea-orm-cli/src — 1 commit
- sea-orm-migration/Cargo.toml — 1 commit
- sea-orm-sync/tests — 1 commit
Notable commits
- fix: Fix 2.0.4 changelog index after #3200 revert
- fix: Fix bump.sh taplo no-op, and document it in RELEASE.md
- fix: Fix left_join_linked joining multi-hop links onto the wrong alias (#3199)
- fix: Fix schema sync failing to drop a stale index on MySQL (#3202)
- fix: Revert "sea-orm-migration: don't depend on stream feature (#3200)"
- change: 2.0.3
- change: 2.0.4
- change: Add select_except to select all columns except the given ones (#3211)
- change: Add changelog for 2.0.4
- change: Apply save_as cast to eq_any / ne_all arrays (#3208)
- change: Build the 3 slowest examples as one workspace
- change: Merge pull request #3210 from SeaQL/split-test-common
- change: Merge remote-tracking branch 'origin/master' into split-test-common
- change: Refine SeaORM 2.0.3 release notes
- change: Regenerate sea-orm-sync (eq_any / ne_all save_as cast)
- change: Respect condition_type in linked joins (#3203)
- change: Restore taplo comment alignment after 2.0.3 bump
- change: Restore the #3208 example in the 2.0.4 changelog
- change: Split tests/common so each test binary compiles only the modules it uses
- change: Support postgres:db_name URLs in sea-orm-cli entity generation (#3197)
- …and 8 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
SeaQL/sea-orm was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit db40a19a7bde7be8e1c4b346b1b70d72e87f0245 — the exact code this score is about.
- Scored under rubric-2026.09.17 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fbec9b1e08c2.