public class ReadOnlyReconnectingDbConnection extends Object implements DbQueryable
Is thread-safe, you can use this from multiple threads
It is assumed that the results of one query are read before the next one begins. Starting a new query can close the old database connection when reconnecting, meaning reads from previous queries might not work.
DbTransaction,
Project on GitHub| Constructor and Description |
|---|
ReadOnlyReconnectingDbConnection(DbTransaction.DbTransactionFactory fac) |
| Modifier and Type | Method and Description |
|---|---|
DbTransaction.DbQueryResultSet |
query(CharSequence sql,
List<Object> args) |
DbTransaction.DbQueryResultSet |
query(String sql,
Object... args) |
public ReadOnlyReconnectingDbConnection(DbTransaction.DbTransactionFactory fac)
public DbTransaction.DbQueryResultSet query(String sql, Object... args)
query in interface DbQueryablepublic DbTransaction.DbQueryResultSet query(CharSequence sql, List<Object> args)
query in interface DbQueryable