I want to insert the literal '${a}'
into a table using anorm 2.5.2, which means I want to execute the bare SQL query
INSERT INTO `db`.`table` (`a`) VALUES ('${a}');
without using any anorm / string interpolation. When I try to do the following
SQL("INSERT INTO `db`.`table` (`a`) VALUES ('${a}');").execute()
I get an anorm.Sql$MissingParameter: Missing parameter value
exception because it tries to use anorm interpolation on ${a}
but no value a
is available in the scope.
How to escape the anorm / string interpolations $...
and ${...}
?
Escape a dollar sign in string interpolation doesn't seem to work here.