EscapeBuilder

Trait EscapeBuilder 

Source
pub trait EscapeBuilder {
    // Provided methods
    fn needs_escape(&self, s: &str) -> bool { ... }
    fn escape_string(&self, string: &str) -> String { ... }
    fn write_escaped(&self, buffer: &mut impl Write, string: &str) { ... }
    fn unescape_string(&self, string: &str) -> String { ... }
}

Provided Methods§

Source

fn needs_escape(&self, s: &str) -> bool

Return if string literal needs to be escaped

Source

fn escape_string(&self, string: &str) -> String

Escape a SQL string literal

Source

fn write_escaped(&self, buffer: &mut impl Write, string: &str)

Source

fn unescape_string(&self, string: &str) -> String

Unescape a SQL string literal

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl EscapeBuilder for MysqlQueryBuilder

Available on crate feature backend-mysql only.
Source§

impl EscapeBuilder for PostgresQueryBuilder

Available on crate feature backend-postgres only.
Source§

impl EscapeBuilder for SqliteQueryBuilder

Available on crate feature backend-sqlite only.