Expand description
TideORM is a Rust ORM with macro-generated models, a query builder, and field-declared relation helpers.
When you are trying to debug behavior, start with:
query::QueryBuilder::debug()to inspect generated SQL before executionlogging::QueryLoggerto see executed queries and slow-query timingdatabase::Database::init()orDatabase::set_global()errors when models report that no global database has been configured
The module docs below cover the public surface area in more detail.
Re-exports§
pub use database::Database;pub use callbacks::CallbackRunner;pub use callbacks::Callbacks;pub use config::Config;pub use config::TideConfig;pub use database::db;pub use database::has_global_db;pub use database::require_db;pub use database::try_db;pub use error::Error;pub use error::Result;pub use migration::ColumnType;pub use migration::Migration;pub use migration::Migrator;pub use migration::Schema;pub use model::Model;pub use model::ModelMeta;pub use query::AggregateFunction;pub use query::JoinClause;pub use query::JoinType;pub use query::Order;pub use query::QueryBuilder;pub use relations::BelongsTo;pub use relations::EagerLoadExt;pub use relations::HasMany;pub use relations::HasOne;pub use relations::RelationExt;pub use relations::WithRelations;pub use schema::SchemaWriter;pub use soft_delete::SoftDelete;pub use logging::LogLevel;pub use logging::QueryDebugInfo;pub use logging::QueryLogEntry;pub use logging::QueryLogger;pub use logging::QueryOperation;pub use logging::QueryStats;pub use logging::QueryTimer;pub use profiling::GlobalProfiler;pub use profiling::GlobalStats;pub use profiling::ProfileReport;pub use profiling::ProfiledQuery;pub use profiling::Profiler;pub use profiling::QueryAnalyzer;pub use profiling::QueryComplexity;pub use profiling::QuerySuggestion;pub use profiling::SuggestionLevel;pub use cache::CacheConfig;pub use cache::CacheKeyBuilder;pub use cache::CacheOptions;pub use cache::CacheStats;pub use cache::CacheStrategy;pub use cache::CacheWarmer;pub use cache::CachedStatementInfo;pub use cache::PreparedStatementCache;pub use cache::PreparedStatementConfig;pub use cache::PreparedStatementStats;pub use cache::QueryCache;pub use validation::ValidatableValue;pub use validation::Validate;pub use validation::ValidationBuilder;pub use validation::ValidationErrors;pub use validation::ValidationRule;pub use validation::Validator;pub use tokenization::TokenConfig;pub use tokenization::TokenDecoder;pub use tokenization::TokenEncoder;pub use tokenization::Tokenizable;pub use async_trait;pub use chrono;
Modules§
- cache
- Query caching and prepared statement caching Query caching and prepared statement caching for TideORM
- callbacks
- Callbacks and hooks for model lifecycle events Callbacks and Hooks for Model Lifecycle Events
- columns
- Strongly-typed columns for compile-time type safety Strongly-Typed Columns
- config
- Global configuration Global TideORM configuration
- database
- Database connection and pool management Database connection and pool management
- error
- Error types for TideORM Error types
- logging
- Query logging and debugging Query Logging and Debugging
- migration
- Database migrations Database migration system
- model
- Model trait and utilities Model APIs and shared model-side helpers.
- prelude
- Re-exports for convenience Prelude module for TideORM
- profiling
- Performance profiling Performance Profiling for TideORM
- query
- Fluent query builder Fluent query builder
- relations
- Model relations (belongs_to, has_one, has_many) Model Relations System
- schema
- Schema generation (SQL file export) Schema generation module
- seeding
- Database seeding system Database seeding system
- soft_
delete - Soft delete support Soft Delete support for TideORM models
- sync
- Database schema synchronization (DB_SYNC=true) Database Schema Synchronization Module
- tokenization
- Record tokenization for secure ID encoding Record Tokenization
- types
- Attribute types and casting Attribute types and casting
- validation
- Model validation system Model Validation System
Structs§
- Date
Time - ISO 8601 combined date and time with time zone.
- Decimal
Decimalrepresents a 128 bit representation of a fixed-precision decimal number. The finite set of values of typeDecimalare of the form m / 10e, where m is an integer such that -296 < m < 296, and e is an integer between 0 and 28 inclusive.- Naive
Date Time - ISO 8601 combined date and time without timezone.
- Utc
- The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).
- Uuid
- A Universally Unique Identifier (UUID).
Traits§
- Deserialize
- A data structure that can be deserialized from any data format supported by Serde.
- Serialize
- A data structure that can be serialized into any data format supported by Serde.