构造器和说明 |
---|
SimpleSqlUtilsImpl(javax.sql.DataSource dataSource) |
限定符和类型 | 方法和说明 |
---|---|
protected org.noear.solon.data.sql.impl.CommandPrepare |
buildPrepare(java.lang.String sql,
java.lang.Object args,
boolean returnKeys,
boolean isStream)
构建预处理
|
int |
execute(java.lang.String sql,
java.lang.Object... args)
执行(更新,或删除)
|
int[] |
executeBatch(java.lang.String sql,
java.util.Collection<java.lang.Object[]> argsList)
批量执行(更新,或删除)
|
protected java.sql.Connection |
getConnection()
获取连接(为转换提供重写机会)
|
protected java.lang.Object |
getObject(org.noear.solon.data.sql.impl.CommandPrepare prepare,
int idx)
获取数据(为转换提供重写机会)
|
int |
insert(java.lang.String sql,
java.lang.Object... args)
插入
|
long |
insertReturnKey(java.lang.String sql,
java.lang.Object... args)
插入并返回自增键
|
java.util.Map<java.lang.String,java.lang.Object> |
selectRow(java.lang.String sql,
java.lang.Object... args)
查询并获取行
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
selectRowList(java.lang.String sql,
java.lang.Object... args)
查询并获取行列表
|
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
selectRowStream(java.lang.String sql,
int fetchSize,
java.lang.Object... args)
查询并获取行遍历器
|
java.lang.Object |
selectValue(java.lang.String sql,
java.lang.Object... args)
查询并获取单值
|
java.util.List<java.lang.Object> |
selectValueArray(java.lang.String sql,
java.lang.Object... args)
查询并获取数组
|
protected void |
setObject(java.sql.PreparedStatement stmt,
int idx,
java.lang.Object val)
填充数据(为转换提供重写机会)
|
protected java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
protected java.lang.Object getObject(org.noear.solon.data.sql.impl.CommandPrepare prepare, int idx) throws java.sql.SQLException
java.sql.SQLException
protected void setObject(java.sql.PreparedStatement stmt, int idx, java.lang.Object val) throws java.sql.SQLException
java.sql.SQLException
protected org.noear.solon.data.sql.impl.CommandPrepare buildPrepare(java.lang.String sql, java.lang.Object args, boolean returnKeys, boolean isStream) throws java.sql.SQLException
java.sql.SQLException
public java.lang.Object selectValue(java.lang.String sql, java.lang.Object... args) throws java.sql.SQLException
SqlUtils
selectValue
在接口中 SqlUtils
java.sql.SQLException
public java.util.List<java.lang.Object> selectValueArray(java.lang.String sql, java.lang.Object... args) throws java.sql.SQLException
SqlUtils
selectValueArray
在接口中 SqlUtils
java.sql.SQLException
public java.util.Map<java.lang.String,java.lang.Object> selectRow(java.lang.String sql, java.lang.Object... args) throws java.sql.SQLException
SqlUtils
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> selectRowList(java.lang.String sql, java.lang.Object... args) throws java.sql.SQLException
SqlUtils
selectRowList
在接口中 SqlUtils
java.sql.SQLException
public java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> selectRowStream(java.lang.String sql, int fetchSize, java.lang.Object... args) throws java.sql.SQLException
SqlUtils
selectRowStream
在接口中 SqlUtils
java.sql.SQLException
public int insert(java.lang.String sql, java.lang.Object... args) throws java.sql.SQLException
SqlUtils
public long insertReturnKey(java.lang.String sql, java.lang.Object... args) throws java.sql.SQLException
SqlUtils
insertReturnKey
在接口中 SqlUtils
java.sql.SQLException
public int execute(java.lang.String sql, java.lang.Object... args) throws java.sql.SQLException
SqlUtils
public int[] executeBatch(java.lang.String sql, java.util.Collection<java.lang.Object[]> argsList) throws java.sql.SQLException
SqlUtils
executeBatch
在接口中 SqlUtils
java.sql.SQLException