类 GroupCapacityMapperByMysql
- java.lang.Object
-
- com.alibaba.nacos.plugin.datasource.mapper.AbstractMapper
-
- com.alibaba.nacos.plugin.datasource.impl.mysql.GroupCapacityMapperByMysql
-
- 所有已实现的接口:
GroupCapacityMapper,Mapper
public class GroupCapacityMapperByMysql extends AbstractMapper implements GroupCapacityMapper
The derby implementation ofGroupCapacityMapper.- 作者:
- lixiaoshuang
-
-
构造器概要
构造器 构造器 说明 GroupCapacityMapperByMysql()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.StringdecrementUsageByWhere()used to decrement usage field.java.lang.StringgetDataSource()Get the datasource name.java.lang.StringgetTableName()Get the name of table.java.lang.StringincrementUsageByWhere()used to increment usage field.java.lang.StringincrementUsageByWhereQuotaEqualZero()used to increment usage field.java.lang.StringincrementUsageByWhereQuotaNotEqualZero()used to increment usage field.java.lang.StringinsertIntoSelect()INSERT INTO SELECT statement.java.lang.StringinsertIntoSelectByWhere()INSERT INTO SELECT statement.java.lang.StringselectGroupInfoBySize()used to select group info.java.lang.StringupdateUsage()used to update usage field.java.lang.StringupdateUsageByWhere()used to update usage field.-
从类继承的方法 com.alibaba.nacos.plugin.datasource.mapper.AbstractMapper
count, delete, getPrimaryKeyGeneratedKeys, insert, select, update
-
-
-
-
方法详细资料
-
getTableName
public java.lang.String getTableName()
从接口复制的说明:MapperGet the name of table.- 指定者:
getTableName在接口中Mapper- 返回:
- The name of table.
-
getDataSource
public java.lang.String getDataSource()
从接口复制的说明:MapperGet the datasource name.- 指定者:
getDataSource在接口中Mapper- 返回:
- The name of datasource.
-
insertIntoSelect
public java.lang.String insertIntoSelect()
从接口复制的说明:GroupCapacityMapperINSERT INTO SELECT statement. Used to insert query results into a table.Example: INSERT INTO group_capacity (group_id, quota,`usage`, `max_size`, max_aggr_count, max_aggr_size,gmt_create, gmt_modified) SELECT ?, ?, count(*), ?, ?, ?, ?, ? FROM config_info;
- 指定者:
insertIntoSelect在接口中GroupCapacityMapper- 返回:
- sql.
-
insertIntoSelectByWhere
public java.lang.String insertIntoSelectByWhere()
从接口复制的说明:GroupCapacityMapperINSERT INTO SELECT statement. Used to insert query results into a table.Where condition: group_id=? AND tenant_id = ''
Example: INSERT INTO group_capacity (group_id, quota,`usage`, `max_size`, max_aggr_count, max_aggr_size,gmt_create, gmt_modified) SELECT ?, ?, count(*), ?, ?, ?, ?, ? FROM config_info where group_id=? AND tenant_id = '';
- 指定者:
insertIntoSelectByWhere在接口中GroupCapacityMapper- 返回:
- sql.
-
incrementUsageByWhereQuotaEqualZero
public java.lang.String incrementUsageByWhereQuotaEqualZero()
从接口复制的说明:GroupCapacityMapperused to increment usage field.Where condition: group_id = ? AND usage < ? AND quota = 0;
Example: UPDATE group_capacity SET `usage` = `usage` + 1, gmt_modified = ? WHERE group_id = ? AND `usage` < ? AND quota = 0;
- 指定者:
incrementUsageByWhereQuotaEqualZero在接口中GroupCapacityMapper- 返回:
-
incrementUsageByWhereQuotaNotEqualZero
public java.lang.String incrementUsageByWhereQuotaNotEqualZero()
从接口复制的说明:GroupCapacityMapperused to increment usage field.Where condition: group_id = ? AND usage < quota AND quota != 0
Example: UPDATE group_capacity SET `usage` = `usage` + 1, gmt_modified = ? WHERE group_id = ? AND `usage` < quota AND quota != 0;
- 指定者:
incrementUsageByWhereQuotaNotEqualZero在接口中GroupCapacityMapper- 返回:
-
incrementUsageByWhere
public java.lang.String incrementUsageByWhere()
从接口复制的说明:GroupCapacityMapperused to increment usage field.Where condition: group_id = ?
Example: UPDATE group_capacity SET `usage` = `usage` + 1, gmt_modified = ? WHERE group_id = ?;
- 指定者:
incrementUsageByWhere在接口中GroupCapacityMapper- 返回:
-
decrementUsageByWhere
public java.lang.String decrementUsageByWhere()
从接口复制的说明:GroupCapacityMapperused to decrement usage field.Where condition: group_id = ? AND `usage` > 0
Example: UPDATE group_capacity SET `usage` = `usage` - 1, gmt_modified = ? WHERE group_id = ? AND `usage` > 0;
- 指定者:
decrementUsageByWhere在接口中GroupCapacityMapper- 返回:
-
updateUsage
public java.lang.String updateUsage()
从接口复制的说明:GroupCapacityMapperused to update usage field.Example: UPDATE group_capacity SET `usage` = (SELECT count(*) FROM config_info), gmt_modified = ? WHERE group_id = ?;
- 指定者:
updateUsage在接口中GroupCapacityMapper- 返回:
-
updateUsageByWhere
public java.lang.String updateUsageByWhere()
从接口复制的说明:GroupCapacityMapperused to update usage field.Where condition: group_id=? AND tenant_id = ''
Example: UPDATE group_capacity SET `usage` = (SELECT count(*) FROM config_info WHERE group_id=? AND tenant_id = ''), gmt_modified = ? WHERE group_id= ?;
- 指定者:
updateUsageByWhere在接口中GroupCapacityMapper- 返回:
-
selectGroupInfoBySize
public java.lang.String selectGroupInfoBySize()
从接口复制的说明:GroupCapacityMapperused to select group info.Example: SELECT id, group_id FROM group_capacity WHERE id>? LIMIT ?;
- 指定者:
selectGroupInfoBySize在接口中GroupCapacityMapper- 返回:
-
-