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
//! Type-Safe SQL Builder
//!
//! This module provides SQL builders with compile-time type checking.
//! Invalid SQL constructs are caught at compile time.
//!
//! # Type-Safe Queries (Recommended)
//!
//! Use `Select`, `Insert`, `Update`, `Delete` with schema traits for
//! compile-time validation of column names:
//!
//! ```rust
//! use oxide_sql_core::builder::Select;
//! use oxide_sql_core::schema::Table;
//!
//! // Schema types (normally generated by #[derive(Table)])
//! struct User { id: i32, name: String, active: bool }
//! struct UserTable;
//!
//! impl Table for UserTable {
//! type Row = User;
//! const NAME: &'static str = "users";
//! const COLUMNS: &'static [&'static str] = &["id", "name", "active"];
//! const PRIMARY_KEY: Option<&'static str> = Some("id");
//! }
//!
//! // Compile-time validated SELECT
//! let (sql, params) = Select::<UserTable, _, _>::new()
//! .select_all()
//! .from_table()
//! .build();
//!
//! assert_eq!(sql, "SELECT id, name, active FROM users");
//! ```
//!
//! # Dynamic Queries
//!
//! For string-based queries without compile-time validation, use `SelectDyn`,
//! `InsertDyn`, `UpdateDyn`, `DeleteDyn`:
//!
//! ```rust
//! use oxide_sql_core::builder::{SelectDyn, dyn_col};
//!
//! let (sql, params) = SelectDyn::new()
//! .columns(&["id", "name"])
//! .from("users")
//! .where_clause(dyn_col("active").eq(true))
//! .build();
//!
//! assert_eq!(sql, "SELECT id, name FROM users WHERE active = ?");
//! ```
// Dynamic (string-based) builders
pub use ;
pub use ;
pub use InsertDyn;
pub use SelectDyn;
pub use UpdateDyn;
// Type-safe builders (recommended - these are the default names)
pub use ;
// Common types
pub use ;