|
||||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||
| 使用 SqlParameterSource 的软件包 | |
|---|---|
| net.hasor.jdbc | Hasor Jdbc Operations. |
| net.hasor.jdbc.core | |
| net.hasor.jdbc.core.source | |
| net.hasor.jdbc.core.util | |
| net.hasor.jdbc 中 SqlParameterSource 的使用 |
|---|
| 参数类型为 SqlParameterSource 的 net.hasor.jdbc 中的方法 | ||
|---|---|---|
int[] |
JdbcOperations.batchUpdate(String sql,
SqlParameterSource[] batchArgs)
批量执行 SQL 语句,这一批次中的SQL 参数使用 BatchPreparedStatementSetter 接口设置。 |
|
|
JdbcOperations.execute(String sql,
SqlParameterSource paramSource,
PreparedStatementCallback<T> action)
执行一个 JDBC 操作。 |
|
|
JdbcOperations.query(String sql,
SqlParameterSource paramSource,
ResultSetExtractor<T> rse)
查询一个 SQL 语句,使用这个查询将会使用 PreparedStatement 接口操作,并且将 SQL 查询结果集使用 ResultSetExtractor 转换。 |
|
void |
JdbcOperations.query(String sql,
SqlParameterSource paramSource,
RowCallbackHandler rch)
查询一个 SQL 语句,使用这个查询将会使用 PreparedStatement 接口操作,并且结果集行处理使用 RowCallbackHandler 接口处理。 |
|
|
JdbcOperations.query(String sql,
SqlParameterSource paramSource,
RowMapper<T> rowMapper)
查询一个 SQL 语句,使用这个查询将会使用 PreparedStatement 接口操作。 |
|
int |
JdbcOperations.queryForInt(String sql,
SqlParameterSource paramSource)
查询一个 SQL 语句,使用这个查询将会使用 PreparedStatement 接口操作。 |
|
List<Map<String,Object>> |
JdbcOperations.queryForList(String sql,
SqlParameterSource paramSource)
查询一个 SQL 语句,使用这个查询将会使用 PreparedStatement 接口操作。 |
|
|
JdbcOperations.queryForList(String sql,
SqlParameterSource paramSource,
Class<T> elementType)
查询一个 SQL 语句,使用这个查询将会使用 PreparedStatement 接口操作。 |
|
long |
JdbcOperations.queryForLong(String sql,
SqlParameterSource paramSource)
查询一个 SQL 语句,sql 参数通过 SqlParameterSource 封装。 |
|
Map<String,Object> |
JdbcOperations.queryForMap(String sql,
SqlParameterSource paramSource)
查询一个 SQL 语句,使用这个查询将会使用 PreparedStatement 接口操作。 |
|
|
JdbcOperations.queryForObject(String sql,
SqlParameterSource paramSource,
Class<T> requiredType)
查询一个 SQL 语句,查询参数使用 SqlParameterSource 封装,并将查询结果使用 requiredType 参数表示的类型返回。 |
|
|
JdbcOperations.queryForObject(String sql,
SqlParameterSource paramSource,
RowMapper<T> rowMapper)
查询一个 SQL 语句,查询参数使用 SqlParameterSource 封装。 |
|
SqlRowSet |
JdbcOperations.queryForRowSet(String sql,
SqlParameterSource paramSource)
查询一个 SQL 语句,使用这个查询将会使用 PreparedStatement 接口操作。 |
|
int |
JdbcOperations.update(String sql,
SqlParameterSource paramSource)
执行一个更新语句(insert、update、delete),这个查询将会使用 PreparedStatement 接口操作。 |
|
| net.hasor.jdbc.core 中 SqlParameterSource 的使用 |
|---|
| 参数类型为 SqlParameterSource 的 net.hasor.jdbc.core 中的方法 | ||
|---|---|---|
int[] |
JdbcTemplate.batchUpdate(String sql,
SqlParameterSource[] batchArgs)
|
|
|
JdbcTemplate.execute(String sql,
SqlParameterSource paramSource,
PreparedStatementCallback<T> action)
|
|
protected PreparedStatementCreator |
JdbcTemplate.getPreparedStatementCreator(String sql,
SqlParameterSource paramSource)
Build a PreparedStatementCreator based on the given SQL and named parameters. |
|
|
JdbcTemplate.query(String sql,
SqlParameterSource paramSource,
ResultSetExtractor<T> rse)
|
|
void |
JdbcTemplate.query(String sql,
SqlParameterSource paramSource,
RowCallbackHandler rch)
|
|
|
JdbcTemplate.query(String sql,
SqlParameterSource paramSource,
RowMapper<T> rowMapper)
|
|
int |
JdbcTemplate.queryForInt(String sql,
SqlParameterSource paramSource)
|
|
List<Map<String,Object>> |
JdbcTemplate.queryForList(String sql,
SqlParameterSource paramSource)
|
|
|
JdbcTemplate.queryForList(String sql,
SqlParameterSource paramSource,
Class<T> elementType)
|
|
long |
JdbcTemplate.queryForLong(String sql,
SqlParameterSource paramSource)
|
|
Map<String,Object> |
JdbcTemplate.queryForMap(String sql,
SqlParameterSource paramSource)
|
|
|
JdbcTemplate.queryForObject(String sql,
SqlParameterSource paramSource,
Class<T> requiredType)
|
|
|
JdbcTemplate.queryForObject(String sql,
SqlParameterSource paramSource,
RowMapper<T> rowMapper)
|
|
SqlRowSet |
JdbcTemplate.queryForRowSet(String sql,
SqlParameterSource paramSource)
|
|
int |
JdbcTemplate.update(String sql,
SqlParameterSource paramSource)
|
|
| net.hasor.jdbc.core.source 中 SqlParameterSource 的使用 |
|---|
| 实现 SqlParameterSource 的 net.hasor.jdbc.core.source 中的类 | |
|---|---|
class |
AbstractSqlParameterSource
Abstract base class for SqlParameterSource implementations. |
class |
MapSqlParameterSource
SqlParameterSource implementation that holds a given Map of parameters. |
| net.hasor.jdbc.core.util 中 SqlParameterSource 的使用 |
|---|
| 参数类型为 SqlParameterSource 的 net.hasor.jdbc.core.util 中的方法 | |
|---|---|
static int[] |
NamedParameterUtils.buildSqlTypeArray(ParsedSql parsedSql,
SqlParameterSource paramSource)
Convert a Map of parameter types to a corresponding int array. |
static Object[] |
NamedParameterUtils.buildValueArray(ParsedSql parsedSql,
SqlParameterSource paramSource,
List<SqlParameter> declaredParams)
Convert a Map of named parameter values to a corresponding array. |
static int[] |
NamedBatchUpdateUtils.executeBatchUpdateWithNamedParameters(ParsedSql parsedSql,
SqlParameterSource[] batchArgs,
JdbcOperations jdbcOperations)
|
static String |
NamedParameterUtils.substituteNamedParameters(ParsedSql parsedSql,
SqlParameterSource paramSource)
Parse the SQL statement and locate any placeholders or named parameters. |
static String |
NamedParameterUtils.substituteNamedParameters(String sql,
SqlParameterSource paramSource)
Parse the SQL statement and locate any placeholders or named parameters. |
|
||||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||