public class SqlClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SqlClient.BatchSqlCallback |
static interface |
SqlClient.SqlCallback<T> |
static interface |
SqlClient.SqlListCallback<T> |
| Constructor and Description |
|---|
SqlClient(DataSource dataSource) |
| Modifier and Type | Method and Description |
|---|---|
DataSource |
dataSource() |
void |
execute(String sql,
Object... params) |
void |
executeBatch(String sql,
SqlClient.BatchSqlCallback callback) |
<T> T |
executeQuery(String sql,
SqlClient.SqlCallback<T> callback,
Object... params) |
void |
executeStreaming(String sql,
Object... params) |
<T> T |
executeStreamingQuery(String sql,
SqlClient.SqlCallback<T> callback,
Object... params) |
static String[] |
getRsCloumns(ResultSet rs) |
static Map |
rsToMap(ResultSet rs,
String[] keys) |
static List<Map> |
rsToMaps(ResultSet rs) |
static List<Map> |
rsToMaps(ResultSet rs,
String[] keys) |
static Map |
rsToMapSingle(ResultSet rs,
String[] keys) |
public SqlClient(DataSource dataSource)
public DataSource dataSource()
public void execute(String sql, Object... params) throws SQLException
SQLExceptionpublic void executeStreaming(String sql, Object... params) throws SQLException
SQLExceptionpublic void executeBatch(String sql, SqlClient.BatchSqlCallback callback) throws SQLException
SQLExceptionpublic <T> T executeQuery(String sql, SqlClient.SqlCallback<T> callback, Object... params) throws SQLException
SQLExceptionpublic <T> T executeStreamingQuery(String sql, SqlClient.SqlCallback<T> callback, Object... params) throws SQLException
SQLExceptionpublic static Map rsToMapSingle(ResultSet rs, String[] keys) throws SQLException
SQLExceptionpublic static String[] getRsCloumns(ResultSet rs) throws SQLException
SQLExceptionCopyright © 2018. All Rights Reserved.