Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jdbcTemplate setQueryTimeout value type

I would like to know what is the type of value which we need to pass in public void setQueryTimeout(int queryTimeout) in jdbcTemplate. The document says

> Set the query timeout for statements that this JdbcTemplate executes.
> <p>Default is -1, indicating to use the JDBC driver's default (i.e. to
> not pass a specific query timeout setting on the driver). <p>Note: Any
> timeout specified here will be overridden by the remaining transaction
> timeout when executing within a transaction that has a timeout
> specified at the transaction level. @see
> java.sql.Statement#setQueryTimeout

Like to know if queryTimeout is milliseconds, seconds or minutes

like image 786
Alex Man Avatar asked Nov 30 '25 02:11

Alex Man


1 Answers

After checking the similar setQueryTimeout() from java.sql.Statement class, my guess is that they behave the same.

setQueryTimeout(int seconds)

A good way to start with similar issues is to check a working example on the internet. It helps a lot!

like image 140
Hassam Abdelillah Avatar answered Dec 02 '25 21:12

Hassam Abdelillah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!