接口 GroupCapacityMapper
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 java.lang.StringdecrementUsageByWhere()used to decrement usage field.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.Mapper
count, delete, getDataSource, getPrimaryKeyGeneratedKeys, getTableName, insert, select, update
-
-
-
-
方法详细资料
-
insertIntoSelect
java.lang.String insertIntoSelect()
INSERT 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;
- 返回:
- sql.
-
insertIntoSelectByWhere
java.lang.String insertIntoSelectByWhere()
INSERT 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 = '';
- 返回:
- sql.
-
incrementUsageByWhereQuotaEqualZero
java.lang.String incrementUsageByWhereQuotaEqualZero()
used 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;
- 返回:
-
incrementUsageByWhereQuotaNotEqualZero
java.lang.String incrementUsageByWhereQuotaNotEqualZero()
used 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;
- 返回:
-
incrementUsageByWhere
java.lang.String incrementUsageByWhere()
used to increment usage field.Where condition: group_id = ?
Example: UPDATE group_capacity SET `usage` = `usage` + 1, gmt_modified = ? WHERE group_id = ?;
- 返回:
-
decrementUsageByWhere
java.lang.String decrementUsageByWhere()
used 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;
- 返回:
-
updateUsage
java.lang.String updateUsage()
used to update usage field.Example: UPDATE group_capacity SET `usage` = (SELECT count(*) FROM config_info), gmt_modified = ? WHERE group_id = ?;
- 返回:
-
updateUsageByWhere
java.lang.String updateUsageByWhere()
used 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= ?;
- 返回:
-
selectGroupInfoBySize
java.lang.String selectGroupInfoBySize()
used to select group info.Example: SELECT id, group_id FROM group_capacity WHERE id>? LIMIT ?;
- 返回:
-
-