Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: order by resource id (#13108)
Danny Xu79228a1c555f
diff --git a/backend/store/database.go b/backend/store/database.goindex 012f20e666..f62f941810 100644--- a/backend/store/database.go+++ b/backend/store/database.go@@ -535,7 +535,8 @@ func (*Store) listDatabaseImplV2(ctx context.Context, tx *Tx, find *FindDatabaseLEFT JOIN project ON db.project_id = project.idLEFT JOIN instance ON db.instance_id = instance.idWHERE %s- GROUP BY db.id, project.resource_id, instance.resource_id`, strings.Join(where, " AND "))+ GROUP BY db.id, project.resource_id, instance.resource_id+ ORDER BY project.resource_id, instance.resource_id, db.name`, strings.Join(where, " AND "))if v := find.Limit; v != nil {query += fmt.Sprintf(" LIMIT %d", *v)}diff --git a/backend/store/instance.go b/backend/store/instance.goindex 5e6a980af3..01bd19f698 100644--- a/backend/store/instance.go+++ b/backend/store/instance.go@@ -395,7 +395,7 @@ func (s *Store) listInstanceImplV2(ctx context.Context, tx *Tx, find *FindInstan}var instanceMessages []*InstanceMessage- rows, err := tx.QueryContext(ctx, `+ rows, err := tx.QueryContext(ctx, fmt.Sprintf(`SELECTid,resource_id,@@ -409,7 +409,8 @@ func (s *Store) listInstanceImplV2(ctx context.Context, tx *Tx, find *FindInstanoptions,metadataFROM instance- WHERE `+strings.Join(where, " AND "),+ WHERE %s+ ORDER BY resource_id`, strings.Join(where, " AND ")),args...,)if err != nil {diff --git a/backend/store/project.go b/backend/store/project.goindex 7be8bea7c7..017c4bbcd8 100644--- a/backend/store/project.go+++ b/backend/store/project.go@@ -283,7 +283,7 @@ func (s *Store) listProjectImplV2(ctx context.Context, tx *Tx, find *FindProject}var projectMessages []*ProjectMessage- rows, err := tx.QueryContext(ctx, `+ rows, err := tx.QueryContext(ctx, fmt.Sprintf(`SELECTid,resource_id,@@ -294,8 +294,8 @@ func (s *Store) listProjectImplV2(ctx context.Context, tx *Tx, find *FindProjectsetting,row_statusFROM project- WHERE `+strings.Join(where, " AND ")+`- ORDER BY project.id`,+ WHERE %s+ ORDER BY project.resource_id`, strings.Join(where, " AND ")),args...,)if err != nil {