java - simpleJDBCTemplate not replacing quoted parameter -


I am using simpleJDBCTemplate to put a value to a genie database.

  string in SQL "TestTable values ​​(: bla, blah, functionThatTakesattext (': blu'))" BenProperty SQLParametersSourceParameter = New BeanPropertySpellersSmersource (light); SimpleJdbcTemplate.update (SQL, enrolled parameter);  

Now, the blu parameter is actually a number (the actual SQL 2 is real) which is read from the file given by the client.

The resulting database receives something like the following:

  insert testTable values ​​(?,?, FunctionThatTakesAText (': blu')) and fail to change it Stays: blu parameters as expected.  

I am using the current workgroup to replace the blu parameter with its value using a regex, but I'm unsure at how safe it is. > You will not leave anything in quotation marks in STQF (based on skipCommentsAndQuotes () method NamedParameterUtils ), nothing inside the quote should be touched .

It is understood in this context - you

  functionThatTakesAttext (?)  

instead of

  want functi to say the statement ready but say < 

Comments