Skip to main content

pg_sql

Function pg_sql 

Source
pub fn pg_sql(s: &'static str) -> &'static str
Expand description

Rewrite ? → $1, $2, … for PostgreSQL; return unchanged for others.

The rewritten string is cached permanently (via Box::leak) keyed by the pointer identity of the static string literal, so each unique query string is rewritten at most once.