Skip to main content

Module connection

Module connection 

Source
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 implements sqlmodel_core::Connection for 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§

MySqlConnection
MySQL connection.
ServerCapabilities
Server capabilities received during handshake.

Enums§

ConnectionState
Connection state in the MySQL protocol state machine.