MCPcopy Create free account
hub / github.com/gogs/gogs / SearchByName

Method SearchByName

internal/database/users.go:884–886  ·  view source on GitHub ↗

SearchByName returns a list of users whose username or full name matches the given keyword case-insensitively. Results are paginated by given page and page size, and sorted by the given order (e.g. "id DESC"). A total count of all results is also returned. If the order is not given, it's up to the d

(ctx context.Context, keyword string, page, pageSize int, orderBy string)

Source from the content-addressed store, hash-verified

882// all results is also returned. If the order is not given, it's up to the
883// database to decide.
884func (s *UsersStore) SearchByName(ctx context.Context, keyword string, page, pageSize int, orderBy string) ([]*User, int64, error) {
885 return searchUserByName(ctx, s.db, UserTypeIndividual, keyword, page, pageSize, orderBy)
886}
887
888type UpdateUserOptions struct {
889 LoginSource *int64

Callers 3

usersSearchByNameFunction · 0.45
SearchFunction · 0.45

Calls 1

searchUserByNameFunction · 0.85

Tested by 2

usersSearchByNameFunction · 0.36