public class JdbcOperator
extends java.lang.Object
构造器和说明 |
---|
JdbcOperator() |
限定符和类型 | 方法和说明 |
---|---|
static void |
execute(java.sql.Connection conn,
Dialect dialect,
DML dml)
执行指定的数据库操作
|
static java.io.Serializable |
execute(java.sql.Connection conn,
Dialect dialect,
Insert insert,
boolean returnIdentifier,
boolean containId)
执行给定的insert语句
|
static void |
execute(java.sql.Connection conn,
java.lang.String sql)
执行指定的SQL语句
|
static int |
executeDelete(java.sql.Connection conn,
Dialect dialect,
Delete delete)
执行数据库删除操作
|
static <T> T |
executeQuery(java.sql.Connection conn,
Dialect dialect,
Select select,
ResultSetExtractor<T> rse)
执行给定的select语句
|
static int |
executeUpdate(java.sql.Connection conn,
Dialect dialect,
Update update)
执行数据库更新操作
|
static <T> T |
query(java.sql.Connection conn,
java.lang.String sql,
ResultSetExtractor<T> rse)
查询数据并使用特定的转换器返回数据的集合
|
public static void execute(java.sql.Connection conn, java.lang.String sql) throws java.lang.Exception
conn
- 数据库连接sql
- 要执行的SQL语句java.lang.Exception
public static <T> T query(java.sql.Connection conn, java.lang.String sql, ResultSetExtractor<T> rse) throws java.lang.Exception
conn
- 数据库连接sql
- SQL语句rse
- 查询结果转换器java.lang.Exception
public static <T> T executeQuery(java.sql.Connection conn, Dialect dialect, Select select, ResultSetExtractor<T> rse) throws java.lang.Exception
conn
- 数据库连接dialect
- 方言select
- select语言rse
- 查询结果转换器java.lang.Exception
public static java.io.Serializable execute(java.sql.Connection conn, Dialect dialect, Insert insert, boolean returnIdentifier, boolean containId) throws java.lang.Exception
conn
- 数据库连接dialect
- 方言insert
- insert语句returnIdentifier
- 是否返回标记java.lang.Exception
public static void execute(java.sql.Connection conn, Dialect dialect, DML dml) throws java.lang.Exception
conn
- 数据库连接dialect
- 方言dml
- 数据库操作java.lang.Exception
public static int executeDelete(java.sql.Connection conn, Dialect dialect, Delete delete) throws java.lang.Exception
conn
- 数据库连接dialect
- 方言delete
- 删除语句java.lang.Exception