public class SQLStrBuilder extends Object
| 构造器和说明 |
|---|
SQLStrBuilder() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
countAll(String tableName)
无条件统计一个表
|
String |
countAndByColumns(String tableName,
String... columns)
AND条件统计一张表的记录
|
String |
countOrByColumns(String tableName,
String... columns)
OR条件统计一张表的记录
|
String |
deleteByColumns(String tableName,
String... columns)
根据指定的列条件删除表中的记录
|
String |
insertAll(String tableName,
int columnCount)
插入所有字段
|
String |
insertColumns(String tableName,
String... columns)
插入指定字段
|
String |
selectAll(String tableName)
无条件查询所有
|
String |
selectAllByColumns(String tableName,
String... columns)
AND条件查询所有字段
|
String |
selectPartByColumnsAnd(String tableName,
String[] selectColumns,
String... conditionColumns)
AND条件查询所选择的字段
|
String |
updateColumnsByColumnArray(String tableName,
String[] updateColumns,
String[] conditionColumns)
根据指定列条件更新指定列
|
public String countAll(String tableName) throws TableNameNullException
tableName - 表名TableNameNullExceptionpublic String countAndByColumns(String tableName, String... columns) throws TableNameNullException
tableName - 表名columns - where条件需要and统计的列名TableNameNullExceptionpublic String countOrByColumns(String tableName, String... columns) throws TableNameNullException
tableName - 表名columns - where条件需要or统计的列名TableNameNullExceptionpublic String selectPartByColumnsAnd(String tableName, String[] selectColumns, String... conditionColumns) throws TableNameNullException
tableName - 表名selectColumns - 选择要查询的字段routersconditionColumns - and条件的routersTableNameNullExceptionpublic String selectAllByColumns(String tableName, String... columns) throws TableNameNullException
tableName - 表名columns - 条件字段TableNameNullExceptionpublic String selectAll(String tableName) throws TableNameNullException
tableName - 表名TableNameNullExceptionpublic String insertAll(String tableName, int columnCount) throws TableNameNullException
tableName - 表名columnCount - 总共有多少列TableNameNullExceptionpublic String insertColumns(String tableName, String... columns) throws TableNameNullException, InsertColumnNullException
tableName - 表名columns - 插入的字段TableNameNullExceptionInsertColumnNullExceptionpublic String updateColumnsByColumnArray(String tableName, String[] updateColumns, String[] conditionColumns) throws TableNameNullException, UpdateColumnNullException
tableName - 表名updateColumns - 指定要更新的列conditionColumns - 指定where条件的列TableNameNullExceptionUpdateColumnNullExceptionpublic String deleteByColumns(String tableName, String... columns) throws TableNameNullException, DeleteSQLConditionsNullException
tableName - columns - TableNameNullExceptionDeleteSQLConditionsNullExceptionCopyright © 2017. All rights reserved.