Function scooby::postgres::statements::from

source ·
pub fn from(from: impl IntoIteratorOfSameType<FromItem>) -> FromSelectBuilder
Expand description

An alternative way to create SELECT statements, starting from the FROM clause for convenience.

Returns a FromSelectBuilder structure, which expects you to specify expressions for the actual SELECT clause by calling its select method

Examples

use scooby::postgres::from;

let sql = from("Points").select(("x", "y")).where_("x > 1").to_string();

assert_eq!(sql, "SELECT x, y FROM Points WHERE x > 1");