1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//! # Rusticx ORM
//!
//! Blazingly fast, async-first, multi-database ORM for Rust.
//!
//! ## Quick start
//!
//! ```toml
//! [dependencies]
//! rusticx = { version = "0.1", features = ["postgres"] }
//! tokio = { version = "1", features = ["full"] }
//! serde = { version = "1", features = ["derive"] }
//! ```
//!
//! ```rust,ignore
//! use rusticx::prelude::*;
//! use serde::{Deserialize, Serialize};
//! use uuid::Uuid;
//!
//! #[derive(Debug, Serialize, Deserialize, Model)]
//! #[rusticx(table = "users")]
//! pub struct User {
//! #[rusticx(primary_key)]
//! pub id: Uuid,
//! pub name: String,
//! pub email: String,
//! pub age: i32,
//! }
//!
//! #[tokio::main]
//! async fn main() -> rusticx::Result<()> {
//! // Connect
//! let adapter = PostgresAdapter::connect_url("postgres://localhost/mydb").await?;
//! let repo: Repository<User, _> = Repository::new(Arc::new(adapter));
//!
//! // Auto-create table
//! repo.migrate().await?;
//!
//! // Insert
//! let user = User { id: Uuid::new_v4(), name: "Alice".into(), email: "alice@example.com".into(), age: 30 };
//! let inserted = repo.insert(&user).await?;
//!
//! // Find by ID
//! let found = repo.find_by_id(inserted.id).await?;
//!
//! // Query builder
//! let adults = repo.find(
//! repo.query().r#where("age", CondOp::Gte, 18).order_by("name", Direction::Asc)
//! ).await?;
//!
//! // Delete
//! repo.delete_by_id(inserted.id).await?;
//! Ok(())
//! }
//! ```
// ── Core re-exports ────────────────────────────────────────────────────────────
pub use ;
// ── Derive macro re-export ─────────────────────────────────────────────────────
pub use Model;
// ── Backend re-exports (feature-gated) ───────────────────────────────────────
pub use ;
pub use ;
pub use ;
// ── Prelude ────────────────────────────────────────────────────────────────────