Skip to content

Commit

Permalink
add compile test for and or with other attributes than bool expr
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Vella committed Nov 15, 2024
1 parent 90d6b8d commit 93a2677
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
extern crate diesel;

use diesel::prelude::*;

table! {
users {
id -> Integer,
name -> VarChar,
}
}

fn main() {
let conn = &mut PgConnection::establish("…").unwrap();
users::table
.filter(users::id.eq(1).and(users::id).or(users::id))
.select(users::id)
.execute(conn)
.unwrap();
}

0 comments on commit 93a2677

Please sign in to comment.