java - How to query for Double with Spring JDBC template query -


How to ask a question for double with Spring JDBC Temple?

For example:

  get public double-orderscoser () {jdbctemplate.queryFor ???} ("Choose average (scores) from exam"); }  

There are queryForInt and queryForLong, but there is no query

< P> I have not tested it, but the last parameter can work with Double.class .

  public double getAverageScore () {return jdbctemplate.queryForObject ("Choose average (score)", double class); }  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -