Trait diesel::prelude::JoinOnDsl

source ·
pub trait JoinOnDsl: Sized {
    // Provided method
    fn on<On>(self, on: On) -> On<Self, On> { ... }
Expand description

Specify the ON clause for a join statement. This will override any implicit ON clause that would come from joinable!


let data = users::table
            posts::title.eq("My first post"))
    .select((users::name, posts::title.nullable()))
let expected = vec![
    ("Sean".to_string(), Some("My first post".to_string())),
    ("Tess".to_string(), None),
assert_eq!(Ok(expected), data);

Provided Methods§


fn on<On>(self, on: On) -> On<Self, On>

See the trait documentation.

Object Safety§

This trait is not object safe.