Expand description
MySQL connection implementation.
This module implements the MySQL wire protocol connection, including connection establishment, authentication, and state management.
§Current Status
This crate provides both:
- A synchronous wire-protocol implementation (
MySqlConnection) for low-level use. - An asupersync-based async implementation (
MySqlAsyncConnection+SharedMySqlConnection) that implementssqlmodel_core::Connectionfor integration with sqlmodel-query/session/pool.
§Synchronous API
ⓘ
let mut conn = MySqlConnection::connect(config)?;
let rows = conn.query_sync("SELECT * FROM users WHERE id = ?", &[Value::Int(1)])?;
conn.close()?;Structs§
- MySql
Connection - MySQL connection.
- Server
Capabilities - Server capabilities received during handshake.
Enums§
- Connection
State - Connection state in the MySQL protocol state machine.