public final class XdbUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
propertyName |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
closeConnection()
关闭Connection
|
static Integer |
delete(XqlUtil xql)
删除记录
|
static void |
executeBatchStaticSQL(List<String> list)
执行SQL,批量,无返回
|
static String |
executeInsert(String sql)
执行SQL,增
|
static com.alibaba.fastjson.JSONArray |
executeQuery(String sql)
执行SQL,查
|
static Integer |
executeUpdate(String sql)
执行SQL,增、删、改
|
static Connection |
getConnection()
获得数据库的连接
|
static String |
instert(XqlUtil xql)
新增记录
|
static void |
instertList(List<XqlUtil> listXql)
新增记录,批量
|
static com.alibaba.fastjson.JSONArray |
readList(XqlUtil xql)
查询多条记录
|
static com.alibaba.fastjson.JSONObject |
readOne(XqlUtil xql)
查询单条记录
|
static String |
readValue(XqlUtil xql,
String key)
查询单条记录单值
|
static com.alibaba.fastjson.JSONArray |
select(String sql)
查询记录, 输入sql
|
static Integer |
update(XqlUtil xql)
修改记录
|
public static String propertyName
public static Connection getConnection() throws SQLException
SQLException - SQL错误捕获public static com.alibaba.fastjson.JSONArray readList(XqlUtil xql)
xql - xql对象public static com.alibaba.fastjson.JSONObject readOne(XqlUtil xql)
xql - xql对象public static String readValue(XqlUtil xql, String key)
xql - xql对象key - 查询字段public static com.alibaba.fastjson.JSONArray select(String sql)
sql - 查询SQL语句public static com.alibaba.fastjson.JSONArray executeQuery(String sql)
sql - 查询SQL语句public static void executeBatchStaticSQL(List<String> list)
list - SQL语句Listpublic static void closeConnection()
Copyright © 2017. All rights reserved.