zero-mysql 0.5.0

A high-performance MySQL client
Documentation

zero-mysql

A high-performance MySQL client library for Rust.

API Reference (docs.rs) | User Guide

Python binding: pyro-mysql

Feature Flags

  • derive (default): #[derive(FromRow)] and #[derive(RefFromRow)] macros
  • sync (default): synchronous API
  • tokio (default): asynchronous API
  • compio: asynchronous API using compio (experimental)
  • sync-tls: TLS support for synchronous API (experimental)
  • tokio-tls: TLS support for tokio (experimental)
  • compio-tls: TLS support for compio (experimental)
  • diesel: Diesel support (experimental)

TLS flags use native-tls.

External type supports:

  • with-chrono - Support chrono date/time types
  • with-time - Support time date/time types
  • with-uuid - Support uuid types
  • with-rust-decimal - Support rust_decimal types

Perf Notes

  • Prefer MariaDB to MySQL
  • Prefer UnixSocket to TCP
  • Set Opts.upgrade_to_unix_socket=false and manually set the socket path
  • Use Conn.exec_bulk_insert_or_update to group 2~1000 INSERTs or UPDATEs