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
//! MySQL driver for SQLModel Rust.
//!
//! `sqlmodel-mysql` is the **MySQL driver** for the SQLModel ecosystem. It
//! implements the MySQL wire protocol from scratch using asupersync's TCP
//! primitives and exposes a `Connection` implementation for query execution.
//!
//! # Role In The Architecture
//!
//! - Implements `sqlmodel-core::Connection` for MySQL
//! - Provides authentication, protocol framing, and type conversions
//! - Powers `sqlmodel-query` execution and `sqlmodel-session` persistence
//!
//! This crate implements the MySQL wire protocol from scratch using
//! asupersync's TCP primitives. It provides:
//!
//! - Packet framing with sequence numbers
//! - Authentication (mysql_native_password, caching_sha2_password)
//! - Text and binary query protocols
//! - Prepared statement support
//! - Connection management with state machine
//! - Type conversion between Rust and MySQL types
//!
//! # MySQL Protocol Overview
//!
//! MySQL uses a packet-based protocol with:
//! - 3-byte payload length + 1-byte sequence number header
//! - Packets over 16MB are split
//! - Request/response pairing via sequence numbers
//!
//! # Example
//!
//! ```rust,ignore
//! use sqlmodel_mysql::{MySqlConfig, MySqlConnection};
//!
//! let config = MySqlConfig::new()
//! .host("localhost")
//! .port(3306)
//! .user("root")
//! .database("mydb");
//!
//! let conn = MySqlConnection::connect(config)?;
//! ```
pub use ;
pub use ;
pub use ;
// Console integration (feature-gated)
pub use ConsoleAware;