public class DB_Query extends Object
┌─┐ ┌─┐
┌──┘ ┴───────┘ ┴──┐
│ │
│ ─── │
│ ─┬┘ └┬─ │
│ │
│ ─┴─ │
│ │
└───┐ ┌───┘
│ │
│ │
│ │
│ └──────────────┐
│ │
│ ├─┐
│ author:lelouch ┌─┘
│ │
└─┐ ┐ ┌───────┬──┐ ┌──┘
│ ─┤ ─┤ │ ─┤ ─┤
└──┴──┘ └──┴──┘
神兽保佑
代码无BUG!
| 限定符和类型 | 字段和说明 |
|---|---|
protected Connection |
conn |
static boolean |
debug
是否显示日志
|
| 构造器和说明 |
|---|
DB_Query(Connection conn)
Instantiates a new Db query.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected ResultSet |
_executeQuery(String sql)
executeQuery
|
protected ResultSet |
_executeQuery(String sql,
Object... param)
executeQuery
|
protected ResultSet |
_find(String tableName,
String where,
Object... param)
find
|
protected ResultSet |
_findById(String tableName,
String id)
_findById
|
protected static ResultSet |
executeQuery_(Connection conn,
String sql)
executeQuery
|
static ResultSet |
executeQuery_(Connection conn,
String sql,
Object[] param)
executeQuery
|
protected static ResultSet |
executeQuery(Connection conn,
String sql,
Object... param)
executeQuery
|
DB_Result |
executeQuery(SqlQuery sqlQuery)
executeQuery
|
DB_Result |
executeQuery(String sql)
executeQuery
|
DB_Result |
executeQuery(String sql,
Object... param)
executeQuery
|
protected static ResultSet |
find_(Connection conn,
String tableName,
String where,
Object[] param)
find_
|
DB_Result |
find(String tableName,
String where,
Object... param)
find
|
protected static ResultSet |
findAll_(Connection conn,
String tableName)
findAll_
|
DB_Result |
findAll(String tableName)
findById
|
protected static ResultSet |
findById_(Connection conn,
String tableName,
String id)
findById_
|
protected static ResultSet |
findById_(Connection conn,
String tableName,
String id,
String idName)
findById_
|
DB_Result |
findById(String tableName,
String id)
findById
|
DB_Result |
findById(String tableName,
String id,
String idName)
findById
|
protected static List<TableColumn> |
getTabelColumns(Connection conn,
String schema,
String tableName)
Gets tabel info.
|
List<TableColumn> |
getTabelColumns(String schema,
String tableName)
Gets tabel info.
|
protected static String |
getTabelComment(Connection conn,
String schema,
String tableName)
Get tabel comment string .
|
String |
getTabelComment(String schema,
String tableName)
Get tabel comment string .
|
protected static String[] |
getTabels(Connection conn,
String schema)
Get tabels string [ ].
|
String[] |
getTabels(String schema)
Get tabels string [ ].
|
protected Connection conn
public static boolean debug
public DB_Query(Connection conn)
conn - the connpublic DB_Result executeQuery(String sql)
sql - sql语句public DB_Result executeQuery(SqlQuery sqlQuery)
sql - sql语句public DB_Result executeQuery(String sql, Object... param)
sql - sql语句param - 参数对象public DB_Result findById(String tableName, String id, String idName)
tableName - 表名id - ididName - id列名public DB_Result findById(String tableName, String id)
tableName - 表名id - idpublic DB_Result findAll(String tableName)
tableName - 表名id - ididName - id列名public DB_Result find(String tableName, String where, Object... param)
tableName - 表名where - where条件param - 参数对象public String[] getTabels(String schema)
schema - the schemapublic String getTabelComment(String schema, String tableName)
schema - the schematableName - the table namepublic List<TableColumn> getTabelColumns(String schema, String tableName)
conn - the connschema - the schematableName - the table nameprotected ResultSet _find(String tableName, String where, Object... param)
tableName - 表名where - where条件param - 参数对象protected ResultSet _executeQuery(String sql)
sql - sql语句protected ResultSet _executeQuery(String sql, Object... param)
sql - sql语句param - the paramprotected static ResultSet executeQuery_(Connection conn, String sql)
conn - 连接对象sql - sql语句protected ResultSet _findById(String tableName, String id)
tableName - 表名id - idpublic static ResultSet executeQuery_(Connection conn, String sql, Object[] param)
conn - 连接对象sql - sql语句param - 参数对象protected static ResultSet find_(Connection conn, String tableName, String where, Object[] param)
conn - 连接对象tableName - 表名where - where条件param - 参数对象protected static ResultSet findAll_(Connection conn, String tableName)
conn - 连接对象tableName - 表名where - where条件param - 参数对象protected static ResultSet findById_(Connection conn, String tableName, String id, String idName)
conn - 连接对象tableName - 表名id - ididName - id列名protected static ResultSet findById_(Connection conn, String tableName, String id)
conn - 连接对象tableName - 表名id - idprotected static ResultSet executeQuery(Connection conn, String sql, Object... param)
conn - 连接对象sql - sql语句param - 参数对象protected static String[] getTabels(Connection conn, String schema)
conn - the connschema - the schemaprotected static String getTabelComment(Connection conn, String schema, String tableName)
conn - the connschema - the schematableName - the table nameprotected static List<TableColumn> getTabelColumns(Connection conn, String schema, String tableName)
conn - the connschema - the schematableName - the table nameCopyright © 2020. All rights reserved.