prepared statement
A query sent with placeholders, with the values sent separately.
A prepared statement is parsed once with placeholders (? or $1), and values are bound separately, so they can never change the query's structure.
Loading interactive…
Examples
sqlx::query("SELECT name FROM tools WHERE name = ?").bind(name)sends the value separately, sox' OR '1'='1matches no rows instead of every row.
See also