Skip to main content

comment

Function comment 

Source
pub fn comment<'a, V: SQLParam>(text: impl AsRef<str>) -> SQL<'a, V>
Expand description

Attach a free-form sqlcommenter comment to a query.

The input is sanitised so it cannot terminate the enclosing comment — any /* becomes / * and any */ becomes * /. An empty input yields an empty SQL fragment (no wrapper).

In driver code you’d typically reach for this via QueryBuilder::comment(...) on the per-dialect builder rather than calling this helper directly.