|
||||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||
| 使用 SqlParameterSource 的软件包 | |
|---|---|
| net.hasor.db.jdbc | Hasor Jdbc Operations. |
| net.hasor.db.jdbc.core | |
| net.hasor.db.jdbc 中 SqlParameterSource 的使用 |
|---|
| 参数类型为 SqlParameterSource 的 net.hasor.db.jdbc 中的方法 | ||
|---|---|---|
int[] |
JdbcOperations.batchUpdate(String sql,
SqlParameterSource[] batchArgs)
批量执行 insert 或 update、delete 语句,这一批次中的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 封装。 |
|
int |
JdbcOperations.update(String sql,
SqlParameterSource paramSource)
执行一个更新语句(insert、update、delete),这个查询将会使用 PreparedStatement 接口操作。 |
|
| net.hasor.db.jdbc.core 中 SqlParameterSource 的使用 |
|---|
| 参数类型为 SqlParameterSource 的 net.hasor.db.jdbc.core 中的方法 | ||
|---|---|---|
int[] |
JdbcTemplate.batchUpdate(String sql,
SqlParameterSource[] batchArgs)
|
|
static String |
ParsedSql.buildSql(ParsedSql parsedSql,
SqlParameterSource paramSource)
生成SQL |
|
static Object[] |
ParsedSql.buildSqlValues(ParsedSql parsedSql,
SqlParameterSource paramSource)
生成Values |
|
|
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)
|
|
int |
JdbcTemplate.update(String sql,
SqlParameterSource paramSource)
|
|
|
||||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||