Expand description
SZ-ORM Model Trait
Core model abstractions for SZ-ORM:
Modeltrait: all ORM models must implement thisActiveRecordtrait: active record patternAccessor/Mutator: field-level getters/settersBehavior: pluggable lifecycle hooksDirtyTracker: change tracking for fields
Re-exports§
pub use accessors::*;pub use behaviors::*;pub use db_type::*;pub use dialect::*;pub use dirty_attributes::*;pub use error::*;pub use executor::*;pub use hooks::*;pub use model::*;pub use result_map::*;pub use sql_safety::*;pub use value::*;
Modules§
- accessors
- Accessors / Mutators + Attribute Casting
- behaviors
- 行为系统(Behaviors)— 可插拔代码复用单元
- db_type
- 数据库类型定义
- dialect
- 不同数据库的方言抽象
- dirty_
attributes - 脏字段追踪(Dirty Attributes)+ @DynamicInsert / @DynamicUpdate
- error
- 错误类型与处理
- executor
- 执行器 trait(模型层与执行层的契约)
- hooks
- 钩子系统(Hooks)— 软删除 + 多租户
- model
- 模型抽象层
- result_
map - ResultMap 高级映射 + Native Query + ResultSetMapping
- sql_
safety - SQL 安全工具:标识符与外键动作校验
- value
- Value 类型定义