Why TideORM?

TideORM is a developer-friendly Rust ORM built on SeaORM with an intuitive experience in mind. TideORM brings the best patterns from popular ORMs to Rust while leveraging SeaORM's powerful, battle-tested database engine. Whether you're building with PostgreSQL, MySQL, or SQLite, TideORM provides type-safe, async-first operations.

Zero Boilerplate

Define models with simple derive macros. No verbose entity definitions or complex trait implementations required.

Type Safe Columns

Use User::columns.name for compile-time safety or strings for flexibility. The same methods work with both!

Async First

Built for async/await from the ground up. Works seamlessly with Tokio and async-std runtimes.

TideORM Studio

Beautiful web-based UI for model generation, migrations, seeding, and interactive SQL playground.

Multi-Database

PostgreSQL, MySQL, and SQLite support via SeaORM. Switch databases without changing your model code.

File Attachments

HasOne/HasMany file relationships with metadata, URL generation, and CDN support built-in.

Translations (i18n)

Built-in multilingual content support with JSONB storage. Set, get, and sync translations easily.

Record Tokenization

Secure, encrypted, URL-safe tokens for record IDs. Never expose internal database IDs in APIs.

Full-Text Search

Cross-database search with highlighting, ranking, and boolean operators. Works on PG, MySQL, SQLite.

Soft Deletes

Built-in soft delete support with automatic query scoping. Restore deleted records with ease.

Window Functions & CTEs

ROW_NUMBER, RANK, LAG/LEAD, running totals, and Common Table Expressions for advanced analytics.

Model Validation

Built-in validation rules: email, URL, min/max, regex, custom validators with clear error messages.

๐ŸŒŠ Powered by SeaORM

TideORM is built on top of SeaORM, the async & dynamic ORM for Rust. SeaORM provides the robust foundation โ€” TideORM adds the developer-friendly API you love.

โœ“ Battle-tested engine โœ“ Regular updates

Get Started in Minutes

Add TideORM to your project and start building.

1

Add to Cargo.toml

[dependencies]
tideorm = "*"
2

Define Your Model

use tideorm::prelude::*;

#[tideorm::model]
#[tide(table = "users")]
pub struct User {
    #[tide(primary_key, auto_increment)]
    pub id: i64,
    pub email: String,
    pub name: String,
    pub active: bool,
}
3

Connect & Query

// Initialize once at startup
TideConfig::init()
    .database("postgres://localhost/myapp")
    .max_connections(20)
    .connect()
    .await?;

// CRUD operations
let user = User { id: 0, email: "john@example.com".into(), .. };
let user = user.save().await?;

let users = User::query()
    .where_eq("active", true)
    .order_desc("created_at")
    .get()
    .await?;

Powerful Query Builder

Everything you need to build complex queries with a clean API.

// Use strings OR typed columns - both work!
User::query().where_eq("status", "active")      // String
User::query().where_eq(User::columns.status, "active") // Typed

// Comparison & Pattern Matching
User::query().where_gt(User::columns.age, 18)
User::query().where_between("age", 18, 65)
User::query().where_like(User::columns.name, "%John%")
User::query().where_in("role", vec!["admin", "mod"])

// NULL Checks
User::query().where_null(User::columns.deleted_at)
User::query().where_not_null("email_verified_at")

// Combine with OR groups (begin_or/end_or)
User::query()
    .where_eq(User::columns.active, true)
    .begin_or()
        .or_where_eq("role", "admin")
        .or_where_gt(User::columns.age, 21)
    .end_or()
    .get().await?;
// Define relations as struct fields
#[tide(has_many = "Post", foreign_key = "user_id")]
pub posts: HasMany<Post>,

#[tide(belongs_to = "User", foreign_key = "user_id")]
pub author: BelongsTo<User>,

// Load relations
let posts = user.posts.load().await?;     // Vec<Post>
let author = post.author.load().await?;  // Option<User>

// Load with constraints
let recent = user.posts.load_with(|q| {
    q.where_eq("published", true).limit(5)
}).await?;
// Define file attachments on model
#[tide(has_one_file = "thumbnail")]
#[tide(has_many_files = "images")]
pub struct Product { ... }

// Attach files
product.attach("thumbnail", "uploads/thumb.jpg")?;
product.attach_many("images", vec!["img1.jpg", "img2.jpg"])?;

// Get files with auto URL generation
let thumb = product.get_file("thumbnail")?;
println!("URL: {}", thumb.url()); // CDN URL
// Enable soft deletes in your model
#[tide(table = "posts", soft_delete)]
pub struct Post { ... }

// By default, soft-deleted records are excluded
let active = Post::query().get().await?;

// Include or only get soft-deleted
let all = Post::query().with_trashed().get().await?;
let trash = Post::query().only_trashed().get().await?;

// Soft delete & restore
post.soft_delete().await?;
post.restore().await?;
// Enable secure tokenization
#[tide(table = "users", tokenize)]
pub struct User { ... }

// Never expose internal IDs in APIs
let token = user.tokenize()?;  // "iIBmdKYhJh4_vSKF..."

// Decode and fetch
let id = User::detokenize(&token)?;   // 1
let user = User::from_token(&token).await?;

// Use in REST APIs: GET /api/users/{token}

๐Ÿ› ๏ธ TideORM CLI & Studio

A powerful command-line interface with a beautiful web-based UI for managing your TideORM projects.

# Install the CLI
cargo install tideorm-cli

# Initialize a project
tideorm init my_project

# Generate models with all options
tideorm make model User \
  --fields="name:string,email:string:unique" \
  --relations="posts:has_many:Post" \
  --timestamps --soft-deletes --tokenize --migration

# Launch TideORM Studio (Web UI)
tideorm ui
๐Ÿ“Š

Dashboard

Quick actions & command history

๐Ÿ—๏ธ

Model Generator

Visual form for creating models

๐Ÿ“ฆ

Migration Manager

Create, run & rollback migrations

โšก

Query Playground

Interactive SQL editor with templates

Familiar Patterns, Rust Performance

If you've used these ORMs, you'll feel right at home with TideORM. Built on SeaORM for rock-solid performance.

๐Ÿš‚ Rails ActiveRecord

Global connection, convention over configuration, scopes, callbacks, soft deletes.

๐ŸŽผ Laravel Eloquent

Fluent query builder, where clauses, relationships, model events.

๐Ÿ“ฆ Sequelize

Model definitions, find/findAll, update/destroy, JSON support.

๐Ÿ”ง TideORM + SeaORM = Perfect Match

Your Code Clean, intuitive API
โ†’
TideORM Developer-friendly layer
โ†’
SeaORM Battle-tested engine
โ†’
Database PostgreSQL / MySQL / SQLite
๐Ÿšง Early Stage

Ready to Ride the Tide?

TideORM is in active development and we need your help! We're looking for:

  • ๐Ÿงช Testers - Try TideORM in real projects and report issues
  • ๐Ÿ’ก Ideas - Suggest new features and API improvements
  • ๐Ÿ› Bug Reports - Help us make TideORM rock-solid
  • ๐Ÿ‘ฅ Contributors - Code contributions are always welcome

Get Started with TideORM CLI

cargo install tideorm-cli
tideorm init my_project
tideorm ui  # Launch TideORM Studio