sqlx/sqlx-mysql/src/database.rs
iamjpotts 81526898d4
refactor(core): Remove lifetime parameter from Arguments trait (#3960)
* refactor(core): Remove lifetime parameter from Arguments trait

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>

* refactor(core): Also relax lifetime of argument passed to Query::bind and Query::try_bind

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>

---------

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2025-09-13 21:47:45 -07:00

39 lines
926 B
Rust

use crate::value::{MySqlValue, MySqlValueRef};
use crate::{
MySqlArguments, MySqlColumn, MySqlConnection, MySqlQueryResult, MySqlRow, MySqlStatement,
MySqlTransactionManager, MySqlTypeInfo,
};
pub(crate) use sqlx_core::database::{Database, HasStatementCache};
/// MySQL database driver.
#[derive(Debug)]
pub struct MySql;
impl Database for MySql {
type Connection = MySqlConnection;
type TransactionManager = MySqlTransactionManager;
type Row = MySqlRow;
type QueryResult = MySqlQueryResult;
type Column = MySqlColumn;
type TypeInfo = MySqlTypeInfo;
type Value = MySqlValue;
type ValueRef<'r> = MySqlValueRef<'r>;
type Arguments = MySqlArguments;
type ArgumentBuffer = Vec<u8>;
type Statement = MySqlStatement;
const NAME: &'static str = "MySQL";
const URL_SCHEMES: &'static [&'static str] = &["mysql", "mariadb"];
}
impl HasStatementCache for MySql {}