Skip to main content

SQLParam

Trait SQLParam 

Source
pub trait SQLParam: Clone + Debug {
    type DialectMarker: DialectTypes;

    const DIALECT: Dialect;
}
Expand description

A marker trait for types that can be used as SQL parameters.

This trait is used as a bound on the parameter type in SQL fragments. It ensures type safety when building SQL queries with parameters.

Required Associated Constants§

Source

const DIALECT: Dialect

The SQL dialect for this parameter type

Required Associated Types§

Source

type DialectMarker: DialectTypes

Type-level dialect marker for compile-time dispatch.

Used by crate::row::SQLTypeToRust to select dialect-specific type mappings and by crate::dialect::DialectTypes to resolve conceptual SQL types to dialect-native markers.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§