Skip to main content

Module types

Module types 

Source
Expand description

MySQL type system and type conversion.

This module provides:

  • MySQL field type constants
  • Encoding/decoding between Rust types and MySQL wire format
  • Type information for column definitions

§MySQL Type System

MySQL uses field type codes in result sets and binary protocol. The encoding differs between text protocol (all strings) and binary protocol (type-specific binary encoding).

Modules§

column_flags
Column flags in result set metadata.

Structs§

ColumnDef
Column definition from a result set.

Enums§

FieldType
MySQL field type codes.

Functions§

decode_binary_value
Decode a binary protocol value to a sqlmodel Value.
decode_binary_value_with_len
Decode a binary protocol value and return bytes consumed.
decode_text_value
Decode a text protocol value to a sqlmodel Value.
encode_binary_value
Encode a sqlmodel Value for binary protocol.
format_value_for_sql
Format a sqlmodel Value for use in MySQL text protocol SQL.
interpolate_params
Interpolate parameters into a SQL query string.