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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user