public class SimpleSqlQuerier extends java.lang.Object implements SqlQuerier
| 构造器和说明 |
|---|
SimpleSqlQuerier(javax.sql.DataSource dataSource,
java.lang.String sql) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected org.noear.solon.data.sql.impl.StatementHolder |
buildStatement(SqlCommand cmd,
boolean returnKeys,
boolean isStream)
开始命令处理
|
protected java.sql.Connection |
getConnection()
获取连接(为转换提供重写机会)
|
SqlQuerier |
params(java.util.Collection<java.lang.Object[]> argsList)
绑定参数(用于批处理)
|
<S> SqlQuerier |
params(java.util.Collection<S> argsList,
java.util.function.Supplier<StatementBinder<S>> binderSupplier)
绑定参数(用于批处理)
|
SqlQuerier |
params(java.lang.Object... args)
绑定参数
|
<S> SqlQuerier |
params(S args,
StatementBinder<S> binder)
绑定参数
|
<T> T |
queryRow(java.lang.Class<T> tClass)
查询并获取行
|
<T> T |
queryRow(RowConverter<T> converter)
查询并获取行
|
protected <T> java.lang.Object |
queryRowDo(RowConverter<T> converter) |
<T> RowIterator<T> |
queryRowIterator(int fetchSize,
java.lang.Class<T> tClass)
查询并获取行遍历器(流式读取)
|
<T> RowIterator<T> |
queryRowIterator(int fetchSize,
RowConverter<T> converter)
查询并获取行遍历器(流式读取)
|
protected <T> RowIterator<T> |
queryRowIteratorDo(int fetchSize,
RowConverter<T> converter) |
<T> java.util.List<T> |
queryRowList(java.lang.Class<T> tClass)
查询并获取行列表
|
<T> java.util.List<T> |
queryRowList(RowConverter<T> converter)
查询并获取行列表
|
protected <T> java.util.List<T> |
queryRowListDo(RowConverter<T> converter) |
<T> T |
queryValue()
查询并获取值
|
<T> java.util.List<T> |
queryValueList()
查询并获取值列表
|
int |
update()
更新(插入、或更新、或删除)
|
int[] |
updateBatch()
批量更新(插入、或更新、或删除)
|
protected int[] |
updateBatchDo() |
<T> java.util.List<T> |
updateBatchReturnKeys()
批量更新并返回主键(插入、或更新、或删除)
|
protected <T> java.util.List<T> |
updateBatchReturnKeysDo() |
protected int |
updateDo() |
<T> T |
updateReturnKey()
更新并返回主键
|
protected java.lang.Object |
updateReturnKeyDo() |
public SimpleSqlQuerier(javax.sql.DataSource dataSource,
java.lang.String sql)
public SqlQuerier params(java.lang.Object... args)
SqlQuerierparams 在接口中 SqlQuerierpublic <S> SqlQuerier params(S args, StatementBinder<S> binder)
SqlQuerierparams 在接口中 SqlQuerierpublic SqlQuerier params(java.util.Collection<java.lang.Object[]> argsList)
SqlQuerierparams 在接口中 SqlQuerierpublic <S> SqlQuerier params(java.util.Collection<S> argsList, java.util.function.Supplier<StatementBinder<S>> binderSupplier)
SqlQuerierparams 在接口中 SqlQuerierpublic <T> T queryValue()
throws java.sql.SQLException
SqlQuerierqueryValue 在接口中 SqlQuerierjava.sql.SQLExceptionpublic <T> java.util.List<T> queryValueList()
throws java.sql.SQLException
SqlQuerierqueryValueList 在接口中 SqlQuerierjava.sql.SQLExceptionpublic <T> T queryRow(java.lang.Class<T> tClass)
throws java.sql.SQLException
SqlQuerierqueryRow 在接口中 SqlQueriertClass - Map.class or T.classjava.sql.SQLExceptionpublic <T> T queryRow(RowConverter<T> converter) throws java.sql.SQLException
SqlQuerierqueryRow 在接口中 SqlQuerierjava.sql.SQLExceptionprotected <T> java.lang.Object queryRowDo(RowConverter<T> converter) throws java.sql.SQLException
java.sql.SQLExceptionpublic <T> java.util.List<T> queryRowList(java.lang.Class<T> tClass)
throws java.sql.SQLException
SqlQuerierqueryRowList 在接口中 SqlQueriertClass - Map.class or T.classjava.sql.SQLExceptionpublic <T> java.util.List<T> queryRowList(RowConverter<T> converter) throws java.sql.SQLException
SqlQuerierqueryRowList 在接口中 SqlQuerierjava.sql.SQLExceptionprotected <T> java.util.List<T> queryRowListDo(RowConverter<T> converter) throws java.sql.SQLException
java.sql.SQLExceptionpublic <T> RowIterator<T> queryRowIterator(int fetchSize, java.lang.Class<T> tClass) throws java.sql.SQLException
SqlQuerierqueryRowIterator 在接口中 SqlQueriertClass - Map.class or T.classjava.sql.SQLExceptionpublic <T> RowIterator<T> queryRowIterator(int fetchSize, RowConverter<T> converter) throws java.sql.SQLException
SqlQuerierqueryRowIterator 在接口中 SqlQuerierjava.sql.SQLExceptionprotected <T> RowIterator<T> queryRowIteratorDo(int fetchSize, RowConverter<T> converter) throws java.sql.SQLException
java.sql.SQLExceptionpublic int update()
throws java.sql.SQLException
SqlQuerierupdate 在接口中 SqlQuerierjava.sql.SQLExceptionprotected int updateDo()
throws java.sql.SQLException
java.sql.SQLExceptionpublic <T> T updateReturnKey()
throws java.sql.SQLException
SqlQuerierupdateReturnKey 在接口中 SqlQuerierjava.sql.SQLExceptionprotected java.lang.Object updateReturnKeyDo()
throws java.sql.SQLException
java.sql.SQLExceptionpublic int[] updateBatch()
throws java.sql.SQLException
SqlQuerierupdateBatch 在接口中 SqlQuerierjava.sql.SQLExceptionprotected int[] updateBatchDo()
throws java.sql.SQLException
java.sql.SQLExceptionpublic <T> java.util.List<T> updateBatchReturnKeys()
throws java.sql.SQLException
SqlQuerierupdateBatchReturnKeys 在接口中 SqlQuerierjava.sql.SQLExceptionprotected <T> java.util.List<T> updateBatchReturnKeysDo()
throws java.sql.SQLException
java.sql.SQLExceptionprotected org.noear.solon.data.sql.impl.StatementHolder buildStatement(SqlCommand cmd, boolean returnKeys, boolean isStream) throws java.sql.SQLException
java.sql.SQLExceptionprotected java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLException