mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-08 03:00:26 +08:00
优化查询所有集群性能
This commit is contained in:
@@ -100,6 +100,7 @@ func (this *NodeClusterDAO) FindNodeClusterName(tx *dbs.Tx, clusterId int64) (st
|
|||||||
// FindAllEnableClusters 查找所有可用的集群
|
// FindAllEnableClusters 查找所有可用的集群
|
||||||
func (this *NodeClusterDAO) FindAllEnableClusters(tx *dbs.Tx) (result []*NodeCluster, err error) {
|
func (this *NodeClusterDAO) FindAllEnableClusters(tx *dbs.Tx) (result []*NodeCluster, err error) {
|
||||||
_, err = this.Query(tx).
|
_, err = this.Query(tx).
|
||||||
|
Result(NodeClusterFieldId, NodeClusterFieldName, NodeClusterFieldIsOn, NodeClusterFieldHealthCheck, NodeClusterFieldAutoRemoteStart, NodeClusterFieldAutoRegister, NodeClusterFieldCreatedAt, NodeClusterFieldUniqueId, NodeClusterFieldSecret).
|
||||||
State(NodeClusterStateEnabled).
|
State(NodeClusterStateEnabled).
|
||||||
Slice(&result).
|
Slice(&result).
|
||||||
Desc("isPinned").
|
Desc("isPinned").
|
||||||
|
|||||||
Reference in New Issue
Block a user