Returns updated statement and associated parameter names.
Returns updated statement and associated parameter names. Extracts parameter names from {placeholder}s, replaces with ?.
import anorm.SqlStatementParser.parse val parsed: (String, List[String]) = parse("SELECT * FROM schema.table WHERE name = {name} AND cat = ?") // parsed == // ("SELECT * FROM schema.table WHERE name = ? AND cat = ?" -> // List("name"))
(Changed in version 2.9.0) The p0
call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
(Changed in version 2.10.0) stringLiteral
allows escaping single and double quotes, but not forward slashes any longer.
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0
Parser for SQL statement.