Package org.knowm.yank
Class Yank
java.lang.Object
org.knowm.yank.Yank
A wrapper for DBUtils' QueryRunner's methods: update, query, and batch. Connections are retrieved
from the connection pool in DBConnectionManager.
- Author:
- timmolter
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addSQLStatements
(Properties sqlProperties) Add SQL statements in a properties file.static int
Executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL prepared statement.static int
Executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL prepared statement.static int[]
executeBatch
(String sql, Object[][] params) Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement using the default connection pool.static int[]
executeBatch
(String poolName, String sql, Object[][] params) Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statementstatic int[]
executeBatchSQLKey
(String sqlKey, Object[][] params) Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.static int[]
executeBatchSQLKey
(String poolName, String sqlKey, Object[][] params) Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).static int
executeSQLKey
(String sqlKey, Object[] params) Executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.static int
executeSQLKey
(String poolName, String sqlKey, Object[] params) Executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).static com.zaxxer.hikari.HikariDataSource
getConnectionPool
(String poolName) Exposes access to the configured connection poolstatic com.zaxxer.hikari.HikariDataSource
Exposes access to the default connection pool.static Long
Executes a given INSERT SQL prepared statement.static Long
Executes a given INSERT SQL prepared statement.static Long
insertSQLKey
(String sqlKey, Object[] params) Executes a given INSERT SQL prepared statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.static Long
insertSQLKey
(String poolName, String sqlKey, Object[] params) Executes a given INSERT SQL prepared statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).static boolean
static <T> T
Return just one Bean given an SQL statement.static <T> T
Return just one Bean given an SQL statement.static <T> List<T>
queryBeanList
(String sql, Class<T> beanType, Object[] params) Return a List of Beans given an SQL statement using the default connection pool.static <T> List<T>
queryBeanList
(String poolName, String sql, Class<T> beanType, Object[] params) Return a List of Beans given an SQL statementstatic <T> List<T>
queryBeanListSQLKey
(String sqlKey, Class<T> beanType, Object[] params) Return a List of Beans given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.static <T> List<T>
queryBeanListSQLKey
(String poolName, String sqlKey, Class<T> beanType, Object[] params) Return a List of Beans given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).static <T> T
queryBeanSQLKey
(String sqlKey, Class<T> beanType, Object[] params) Return just one Bean given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).static <T> T
queryBeanSQLKey
(String poolName, String sqlKey, Class<T> beanType, Object[] params) Return just one Bean given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).static <T> List<T>
queryColumn
(String sql, String columnName, Class<T> columnType, Object[] params) Return a List of Objects from a single table column given an SQL statement using the default connection pool.static <T> List<T>
Return a List of Objects from a single table column given an SQL statementstatic <T> List<T>
queryColumnSQLKey
(String sqlKey, String columnName, Class<T> columnType, Object[] params) Return a List of Objects from a single table column given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.static <T> List<T>
queryColumnSQLKey
(String poolName, String sqlKey, String columnName, Class<T> columnType, Object[] params) Return a List of Objects from a single table column given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).queryObjectArrays
(String sql, Object[] params) Return a List of generic Object[]s given an SQL statement using the default connection pool.queryObjectArrays
(String poolName, String sql, Object[] params) Return a List of generic Object[]s given an SQL statementqueryObjectArraysSQLKey
(String sqlKey, Object[] params) Return a List of generic Object[]s given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.queryObjectArraysSQLKey
(String poolName, String sqlKey, Object[] params) Return a List of generic Object[]s given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).static <T> T
queryScalar
(String sql, Class<T> scalarType, Object[] params) Return just one scalar given a an SQL statement using the default connection pool.static <T> T
queryScalar
(String poolName, String sql, Class<T> scalarType, Object[] params) Return just one scalar given a an SQL statementstatic <T> T
queryScalarSQLKey
(String sqlKey, Class<T> scalarType, Object[] params) Return just one scalar given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.static <T> T
queryScalarSQLKey
(String poolName, String sqlKey, Class<T> scalarType, Object[] params) Return just one scalar given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).static void
Closes all connection poolsstatic void
releaseConnectionPool
(String poolName) Closes the given connection poolstatic void
Closes the default connection poolstatic void
setThrowWrappedExceptions
(boolean throwWrappedExceptions) Set true if you want methods in "Yank" to throw unchecked `YankSQLException`s, which wrap checked `SQLException`s.static void
setupConnectionPool
(String poolName, Properties dataSourceProperties) Add properties for a DataSource (connection pool).static void
setupDefaultConnectionPool
(Properties dataSourceProperties) Add properties for a DataSource (connection pool).
-
Method Details
-
insertSQLKey
public static Long insertSQLKey(String sqlKey, Object[] params) throws SQLStatementNotFoundException, YankSQLException Executes a given INSERT SQL prepared statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool. Returns the auto-increment id of the inserted row.- Parameters:
sqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valueparams
- The replacement parameters- Returns:
- the auto-increment id of the inserted row, or null if no id is available
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
insertSQLKey
public static Long insertSQLKey(String poolName, String sqlKey, Object[] params) throws SQLStatementNotFoundException, YankSQLException Executes a given INSERT SQL prepared statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...). Returns the auto-increment id of the inserted row.- Parameters:
poolName
- The name of the connection pool to query againstsqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valueparams
- The replacement parameters- Returns:
- the auto-increment id of the inserted row, or null if no id is available
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
insert
Executes a given INSERT SQL prepared statement. Returns the auto-increment id of the inserted row using the default connection pool. Note: This only works when the auto-increment table column is in the first column in the table!- Parameters:
sql
- The query to executeparams
- The replacement parameters- Returns:
- the auto-increment id of the inserted row, or null if no id is available
- Throws:
YankSQLException
-
insert
Executes a given INSERT SQL prepared statement. Returns the auto-increment id of the inserted row. Note: This only works when the auto-increment table column is in the first column in the table!- Parameters:
poolName
- The name of the connection pool to query againstsql
- The query to executeparams
- The replacement parameters- Returns:
- the auto-increment id of the inserted row, or null if no id is available
- Throws:
YankSQLException
-
executeSQLKey
public static int executeSQLKey(String sqlKey, Object[] params) throws SQLStatementNotFoundException, YankSQLException Executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool. Returns the number of rows affected.- Parameters:
sqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valueparams
- The replacement parameters- Returns:
- The number of rows affected
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
executeSQLKey
public static int executeSQLKey(String poolName, String sqlKey, Object[] params) throws SQLStatementNotFoundException, YankSQLException Executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...). Returns the number of rows affected.- Parameters:
poolName
- The name of the connection pool to query againstsqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valueparams
- The replacement parameters- Returns:
- The number of rows affected
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
execute
Executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL prepared statement. Returns the number of rows affected using the default connection pool.- Parameters:
sql
- The query to executeparams
- The replacement parameters- Returns:
- The number of rows affected
- Throws:
YankSQLException
-
execute
Executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL prepared statement. Returns the number of rows affected.- Parameters:
poolName
- The name of the connection pool to query againstsql
- The query to executeparams
- The replacement parameters- Returns:
- The number of rows affected
- Throws:
YankSQLException
-
queryScalarSQLKey
public static <T> T queryScalarSQLKey(String sqlKey, Class<T> scalarType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return just one scalar given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool. If more than one row match the query, only the first row is returned.- Parameters:
sqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valuescalarType
- The Class of the desired return scalar matching the tableparams
- The replacement parameters- Returns:
- The Object
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryScalarSQLKey
public static <T> T queryScalarSQLKey(String poolName, String sqlKey, Class<T> scalarType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return just one scalar given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...). If more than one row match the query, only the first row is returned.- Parameters:
poolName
- The name of the connection pool to query againstsqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valuescalarType
- The Class of the desired return scalar matching the tableparams
- The replacement parameters- Returns:
- The Object
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryScalar
public static <T> T queryScalar(String sql, Class<T> scalarType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return just one scalar given a an SQL statement using the default connection pool.- Parameters:
scalarType
- The Class of the desired return scalar matching the tableparams
- The replacement parameters- Returns:
- The scalar Object
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryScalar
public static <T> T queryScalar(String poolName, String sql, Class<T> scalarType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return just one scalar given a an SQL statement- Parameters:
poolName
- The name of the connection pool to query againstscalarType
- The Class of the desired return scalar matching the tableparams
- The replacement parameters- Returns:
- The scalar Object
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryBeanSQLKey
public static <T> T queryBeanSQLKey(String sqlKey, Class<T> beanType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return just one Bean given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...). If more than one row match the query, only the first row is returned using the default connection pool.- Parameters:
sqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valuebeanType
- The Class of the desired return Object matching the tableparams
- The replacement parameters- Returns:
- The Object
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryBeanSQLKey
public static <T> T queryBeanSQLKey(String poolName, String sqlKey, Class<T> beanType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return just one Bean given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...). If more than one row match the query, only the first row is returned.- Parameters:
poolName
- The name of the connection pool to query againstsqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valuebeanType
- The Class of the desired return Object matching the tableparams
- The replacement parameters- Returns:
- The Object
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryBean
public static <T> T queryBean(String sql, Class<T> beanType, Object[] params) throws YankSQLException Return just one Bean given an SQL statement. If more than one row match the query, only the first row is returned using the default connection pool.- Parameters:
sql
- The SQL statementbeanType
- The Class of the desired return Object matching the tableparams
- The replacement parameters- Returns:
- The Object
- Throws:
YankSQLException
-
queryBean
public static <T> T queryBean(String poolName, String sql, Class<T> beanType, Object[] params) throws YankSQLException Return just one Bean given an SQL statement. If more than one row match the query, only the first row is returned.- Parameters:
poolName
- The name of the connection pool to query againstsql
- The SQL statementbeanType
- The Class of the desired return Object matching the tableparams
- The replacement parameters- Returns:
- The Object
- Throws:
YankSQLException
-
queryBeanListSQLKey
public static <T> List<T> queryBeanListSQLKey(String sqlKey, Class<T> beanType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return a List of Beans given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.- Parameters:
sqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valuebeanType
- The Class of the desired return Objects matching the tableparams
- The replacement parameters- Returns:
- The List of Objects
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryBeanListSQLKey
public static <T> List<T> queryBeanListSQLKey(String poolName, String sqlKey, Class<T> beanType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return a List of Beans given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).- Parameters:
poolName
- The name of the connection pool to query againstsqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valuebeanType
- The Class of the desired return Objects matching the tableparams
- The replacement parameters- Returns:
- The List of Objects
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryBeanList
public static <T> List<T> queryBeanList(String sql, Class<T> beanType, Object[] params) throws YankSQLException Return a List of Beans given an SQL statement using the default connection pool.- Parameters:
sql
- The SQL statementbeanType
- The Class of the desired return Objects matching the tableparams
- The replacement parameters- Returns:
- The List of Objects
- Throws:
YankSQLException
-
queryBeanList
public static <T> List<T> queryBeanList(String poolName, String sql, Class<T> beanType, Object[] params) throws YankSQLException Return a List of Beans given an SQL statement- Parameters:
poolName
- The name of the connection pool to query againstsql
- The SQL statementbeanType
- The Class of the desired return Objects matching the tableparams
- The replacement parameters- Returns:
- The List of Objects
- Throws:
YankSQLException
-
queryColumnSQLKey
public static <T> List<T> queryColumnSQLKey(String sqlKey, String columnName, Class<T> columnType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return a List of Objects from a single table column given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.- Parameters:
sqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valuecolumnType
- The Class of the desired return Objects matching the tableparams
- The replacement parameters- Returns:
- The Column as a List
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryColumnSQLKey
public static <T> List<T> queryColumnSQLKey(String poolName, String sqlKey, String columnName, Class<T> columnType, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return a List of Objects from a single table column given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).- Parameters:
poolName
- The name of the connection pool to query againstsqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valuecolumnType
- The Class of the desired return Objects matching the tableparams
- The replacement parameters- Returns:
- The Column as a List
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryColumn
public static <T> List<T> queryColumn(String sql, String columnName, Class<T> columnType, Object[] params) throws YankSQLException Return a List of Objects from a single table column given an SQL statement using the default connection pool.- Type Parameters:
T
-- Parameters:
sql
- The SQL statementcolumnType
- The Class of the desired return Objects matching the tableparams
- The replacement parameters- Returns:
- The Column as a List
- Throws:
YankSQLException
-
queryColumn
public static <T> List<T> queryColumn(String poolName, String sql, String columnName, Class<T> columnType, Object[] params) throws YankSQLException Return a List of Objects from a single table column given an SQL statement- Parameters:
poolName
- The name of the connection pool to query againstsql
- The SQL statementcolumnType
- The Class of the desired return Objects matching the tableparams
- The replacement parameters- Returns:
- The Column as a List
- Throws:
YankSQLException
-
queryObjectArraysSQLKey
public static List<Object[]> queryObjectArraysSQLKey(String sqlKey, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return a List of generic Object[]s given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.- Parameters:
sqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valueparams
- The replacement parameters- Returns:
- The List of generic Object[]s
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryObjectArraysSQLKey
public static List<Object[]> queryObjectArraysSQLKey(String poolName, String sqlKey, Object[] params) throws SQLStatementNotFoundException, YankSQLException Return a List of generic Object[]s given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).- Parameters:
poolName
- The name of the connection pool to query againstsqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valueparams
- The replacement parameters- Returns:
- The List of generic Object[]s
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
queryObjectArrays
Return a List of generic Object[]s given an SQL statement using the default connection pool.- Parameters:
sql
- The SQL statementparams
- The replacement parameters- Returns:
- The List of generic Object[]s
- Throws:
YankSQLException
-
queryObjectArrays
public static List<Object[]> queryObjectArrays(String poolName, String sql, Object[] params) throws YankSQLException Return a List of generic Object[]s given an SQL statement- Parameters:
poolName
- The name of the connection pool to query againstsql
- The SQL statementparams
- The replacement parameters- Returns:
- The List of generic Object[]s
- Throws:
YankSQLException
-
executeBatchSQLKey
public static int[] executeBatchSQLKey(String sqlKey, Object[][] params) throws SQLStatementNotFoundException, YankSQLException Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool.- Parameters:
sqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valueparams
- An array of query replacement parameters. Each row in this array is one set of batch replacement values- Returns:
- The number of rows affected or each individual execution
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
executeBatchSQLKey
public static int[] executeBatchSQLKey(String poolName, String sqlKey, Object[][] params) throws SQLStatementNotFoundException, YankSQLException Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).- Parameters:
poolName
- The name of the connection pool to query againstsqlKey
- The SQL Key found in a properties file corresponding to the desired SQL statement valueparams
- An array of query replacement parameters. Each row in this array is one set of batch replacement values- Returns:
- The number of rows affected or each individual execution
- Throws:
SQLStatementNotFoundException
- if an SQL statement could not be found for the given sqlKey StringYankSQLException
-
executeBatch
Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement using the default connection pool.- Parameters:
sql
- The SQL statementparams
- An array of query replacement parameters. Each row in this array is one set of batch replacement values- Returns:
- The number of rows affected or each individual execution
- Throws:
YankSQLException
-
executeBatch
public static int[] executeBatch(String poolName, String sql, Object[][] params) throws YankSQLException Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement- Parameters:
poolName
- The name of the connection pool to query againstsql
- The SQL statementparams
- An array of query replacement parameters. Each row in this array is one set of batch replacement values- Returns:
- The number of rows affected or each individual execution
- Throws:
YankSQLException
-
setupConnectionPool
Add properties for a DataSource (connection pool). Yank uses a Hikari DataSource (connection pool) under the hood, so you have to provide the minimal essential properties and the optional properties as defined here: https://github.com/brettwooldridge/HikariCP- Parameters:
poolName
-dataSourceProperties
-
-
setupDefaultConnectionPool
Add properties for a DataSource (connection pool). Yank uses a Hikari DataSource (connection pool) under the hood, so you have to provide the minimal essential properties and the optional properties as defined here: https://github.com/brettwooldridge/HikariCP- Parameters:
dataSourceProperties
-
-
addSQLStatements
Add SQL statements in a properties file. Adding more will merge Properties.- Parameters:
sqlProperties
-
-
releaseConnectionPool
Closes the given connection pool -
releaseDefaultConnectionPool
public static void releaseDefaultConnectionPool()Closes the default connection pool -
releaseAllConnectionPools
public static void releaseAllConnectionPools()Closes all connection pools -
getDefaultConnectionPool
public static com.zaxxer.hikari.HikariDataSource getDefaultConnectionPool()Exposes access to the default connection pool.- Returns:
- a configured (pooled) HikariDataSource.
-
getConnectionPool
Exposes access to the configured connection pool- Returns:
- a configured (pooled) HikariDataSource.
-
isThrowWrappedExceptions
public static boolean isThrowWrappedExceptions() -
setThrowWrappedExceptions
public static void setThrowWrappedExceptions(boolean throwWrappedExceptions) Set true if you want methods in "Yank" to throw unchecked `YankSQLException`s, which wrap checked `SQLException`s.- Parameters:
throwWrappedExceptions
-
-