Rust

mysql

Module

MySQL: MySql, and the behaviour MariaDB shares (MySqlFamily).

Contents

1 submodule, and what the module defines itself.

use utopia_query::builder::mysql::MySqlDialect;
Rust
pub struct MySqlDialect

The MySQL dialect.

use utopia_query::builder::mysql::MySqlState;
Rust
pub struct MySqlState

MySQL's own state: the join of a multi-table update or delete.

use utopia_query::builder::mysql::MySqlFamily;
Rust
pub trait MySqlFamily: SqlDialect

What MySQL and MariaDB share: their state, and the geometry constructor.

Rust
pub type MySql = Builder<MySqlDialect>

A MySQL builder.

Rust
use utopia_query::Query;
use utopia_query::builder::MySql;

let statement = MySql::new().from("t", "").filter([Query::equal("status", ["active", "pending"])]).build()?;
assert_eq!(statement.query, "SELECT * FROM `t` WHERE `status` IN (?, ?)");

mysql::json_sets

Own page

MySQL's JSON column updates, shared with MariaDB.