You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: filter.go
    path of file: ./repos/gotosocial/internal/db/bundb
    
    the code of the file until where you have to start completion: // GoToSocial
// Copyright (C) GoToSocial Authors admin@gotosocial.org
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope t
    
func (f *filterDB) GetFiltersForAccountID(ctx context.Context, accountID string) ([]*gtsmodel.Filter, error) {
	// Fetch IDs of all filters owned by this account.
	var filterIDs []string
	if err := f.db.
		NewSelect().
		Model((*gtsmodel.Filter)(nil)).
		Column("id").
		Where("? = ?", bun.Ident("account_id"), accountID).
		Scan(ctx, &filterIDs); err != nil {
		return nil, err
	}
	if len(filterIDs) == 0 {
		return nil, nil
	}

	// Get each filter by ID from the cache or DB.
	uncachedFilterIDs := make([]string, 0, len(filterIDs))
	filters, err := f.state.Caches.GTS.Filter.Load(
		"ID",
		func(load func(keyParts ...any) bool) {
			for _, id := range filterIDs {
				if !load(id) {
					uncachedFilterIDs = append(uncachedFilterIDs, id)
				}
			}
		},
		func() ([]*gtsmodel.Filter, error) {
			uncachedFilters := make([]*gtsmodel.Filter, 0, len(uncachedFilterIDs))
			if err := f.db.
				NewSelect().
				Model(&uncachedFilters).
				Where("? IN (?)", bun.Ident("id"), bun.In(uncachedFilterIDs)).
				Scan(ctx); err != nil {
				return nil, err
			}
			return uncachedFilters, nil
		},
	)
	if err != nil {
		return nil, err
	}

	// Put the filter structs in the same order as the filter IDs.
	util.OrderBy(filters, filterIDs, func(filter *gtsmodel.Filter) string { return filter.ID })

	if gtscontext.Barebones(ctx) {
		return filters, nil
	}

	// Populate the filters. Remove any that we can't populate from the return slice.
	errs := gtserror.NewMultiError(len(filters))
	filters = slices.DeleteFunc(filters, func(filter *gtsmodel.Filter) bool {
		if err := f.populateFilter(ctx, filter); err != nil {
			errs.Appendf("error populating filter %s: %w", filter.ID, err)
			return true
		}
		return false
	})

	return filters, errs.Combine()
}