Returns tokenized statement and associated parameter names.
Returns tokenized statement and associated parameter names. Extracts parameter names from {placeholder}s.
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.
Parser for SQL statement.