java.lang.Object
net.odoframework.sql.DefaultSQLTemplate
- All Implemented Interfaces:
SQLTemplate
public class DefaultSQLTemplate extends Object implements SQLTemplate
-
Constructor Summary
Constructors Constructor Description DefaultSQLTemplate(DataSource dataSource) -
Method Summary
Modifier and Type Method Description <T> TdoInTransaction(Supplier<T> supplier)intexecute(DBStatement sql)voidexecute(DBStatement sql, SQLConsumer<ResultSet> rsConsumer)<T> Texecute(DBStatement sql, SQLFunction<ResultSet,T> mapper)ConnectiongetConnection()<T> Stream<T>stream(DBStatement sql, SQLFunction<ResultSet,T> row)
-
Constructor Details
-
DefaultSQLTemplate
-
-
Method Details
-
execute
- Specified by:
executein interfaceSQLTemplate
-
getConnection
- Specified by:
getConnectionin interfaceSQLTemplate- Throws:
SQLException
-
execute
- Specified by:
executein interfaceSQLTemplate
-
execute
- Specified by:
executein interfaceSQLTemplate
-
stream
- Specified by:
streamin interfaceSQLTemplate
-
doInTransaction
- Specified by:
doInTransactionin interfaceSQLTemplate
-