Macro diesel::print_sql [] [src]

macro_rules! print_sql {
    ($query:expr) => { ... };
}
Deprecated since 0.16.0

: use println!("{}", diesel::debug_query(...)) instead

Takes takes a query QueryFragment expression as an argument and prints out the SQL with placeholders for the dynamic values.

Example

Printing SQL from a count statement:

print_sql!(users.count());