Package org.sql2o
Class Connection
java.lang.Object
org.sql2o.Connection
- All Implemented Interfaces:
Closeable
,AutoCloseable
Represents a connection to the database with a transaction.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
commit()
commit
(boolean closeConnection) createQuery
(String queryText) createQuery
(String queryText, boolean returnGeneratedKeys) createQuery
(String queryText, String... columnNames) createQueryWithParams
(String queryText, Object... paramValues) int[]
getKey()
<V> V
Object[]
getKeys()
<V> List
<V> int
getSql2o()
boolean
boolean
rollback()
rollback
(boolean closeConnection) setRollbackOnClose
(boolean rollbackOnClose) setRollbackOnException
(boolean rollbackOnException)
-
Method Details
-
isRollbackOnException
public boolean isRollbackOnException() -
setRollbackOnException
-
isRollbackOnClose
public boolean isRollbackOnClose() -
setRollbackOnClose
-
getJdbcConnection
-
getSql2o
-
createQuery
-
createQuery
-
createQuery
-
createQueryWithParams
-
rollback
-
rollback
-
commit
-
commit
-
getResult
public int getResult() -
getBatchResult
public int[] getBatchResult() -
getKey
-
getKey
-
getKeys
-
getKeys
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-