Rust

The adapter writes SQL with named placeholders (:_uid) and binds values with a PDO parameter type. PDO (ATTR_EMULATE_PREPARES) substitutes the placeholders client side with quoted literals and sends the statement as text (mysql_real_query, multi statements allowed); with ATTR_STRINGIFY_FETCHES every fetched value is a string. Pdo reproduces that over mysql_async's text protocol, so the server sees the same bytes and the adapter reads the same values:

Contents

use utopia_database::adapter::mariadb::pdo::Config;
Rust
pub struct Config

Undocumented.

use utopia_database::adapter::mariadb::pdo::Executed;
Rust
pub struct Executed

A statement's result: what execute() returned, the rows and the row count.

use utopia_database::adapter::mariadb::pdo::Pdo;
Rust
pub struct Pdo

The PDO handle: one connection.

use utopia_database::adapter::mariadb::pdo::PdoError;
Rust
pub struct PdoError

A driver error (PDOException): its SQLSTATE, the driver's native code (errorInfo[1]) and its message.

use utopia_database::adapter::mariadb::pdo::Statement;
Rust
pub struct Statement

A prepared statement: SQL with named placeholders and bound values.

use utopia_database::adapter::mariadb::pdo::ParamType;
Rust
pub enum ParamType

A PDO parameter type (PDO::PARAM_*).

use utopia_database::adapter::mariadb::pdo::PdoFailure;
Rust
pub enum PdoFailure

A failed execute(): a driver error, or another exception (a value that cannot be converted to a string).

Also implements From.
use utopia_database::adapter::mariadb::pdo::Rendering;
Rust
pub enum Rendering

Why a statement could not be rendered.

use utopia_database::adapter::mariadb::pdo::quote;
Rust
pub fn quote(s: &[u8]) -> Vec<u8>

$pdo->quote($string): the string in single quotes, escaped by mysqlnd_cset_escape_slashes for utf8mb4.

use utopia_database::adapter::mariadb::pdo::to_long;
Rust
pub fn to_long(value: &Value) -> i64

Undocumented.