Rename team DB methods to encourage lighter-weight usage (#35572)

For #35357.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

No changes file as this is a zero-functionality-change refactor.
Performance improvements are in their own PR, which includes a changes
file.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests

- [ ] QA'd all new/changed functionality manually
This commit is contained in:
Ian Littman
2025-11-12 08:09:49 -06:00
committed by GitHub
parent 4e97263881
commit 545bc6c692
41 changed files with 91 additions and 91 deletions
+2 -2
View File
@@ -5356,14 +5356,14 @@ func (s *DataStore) SaveTeam(ctx context.Context, team *fleet.Team) (*fleet.Team
return s.SaveTeamFunc(ctx, team)
}
func (s *DataStore) Team(ctx context.Context, tid uint) (*fleet.Team, error) {
func (s *DataStore) TeamWithExtras(ctx context.Context, tid uint) (*fleet.Team, error) {
s.mu.Lock()
s.TeamFuncInvoked = true
s.mu.Unlock()
return s.TeamFunc(ctx, tid)
}
func (s *DataStore) TeamWithoutExtras(ctx context.Context, tid uint) (*fleet.Team, error) {
func (s *DataStore) TeamLite(ctx context.Context, tid uint) (*fleet.Team, error) {
s.mu.Lock()
s.TeamWithoutExtrasFuncInvoked = true
s.mu.Unlock()