pub fn count_params(sql: &str) -> usizeExpand description
Count the number of positional parameter placeholders in a SQL string.
Recognises both $N (Postgres-style) and ? (MySQL/SQLite-style)
placeholders. For $N parameters, returns the highest N found.
For ? parameters, returns the count.
Note: this is a simple lexical scan, not an AST analysis. It does not distinguish placeholders inside string literals.