public class SqlRunner extends Object
Modifier and Type | Field and Description |
---|---|
static int |
NO_GENERATED_KEY |
Constructor and Description |
---|
SqlRunner(Connection connection) |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection() |
int |
delete(String sql,
Object... args) |
int |
insert(String sql,
Object... args) |
void |
run(String sql) |
List<Map<String,Object>> |
selectAll(String sql,
Object... args) |
Map<String,Object> |
selectOne(String sql,
Object... args) |
void |
setUseGeneratedKeySupport(boolean useGeneratedKeySupport) |
int |
update(String sql,
Object... args) |
public static final int NO_GENERATED_KEY
public SqlRunner(Connection connection)
public void setUseGeneratedKeySupport(boolean useGeneratedKeySupport)
public Map<String,Object> selectOne(String sql, Object... args) throws SQLException
SQLException
public List<Map<String,Object>> selectAll(String sql, Object... args) throws SQLException
SQLException
public int insert(String sql, Object... args) throws SQLException
SQLException
public int update(String sql, Object... args) throws SQLException
SQLException
public int delete(String sql, Object... args) throws SQLException
SQLException
public void run(String sql) throws SQLException
SQLException
public void closeConnection()
Copyright © 2010–2015 MyBatis.org. All rights reserved.