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: interactive_client_autocomplete_legacy.go
    path of file: ./repos/steampipe/pkg/interactive
    
    the code of the file until where you have to start completion: package interactive

import (
	"fmt"
	"sort"

	"github.com/c-bata/go-prompt"
	"github.com/turbot/go-kit/helpers"
	"github.com/turbot/steampipe/pkg/steampipeconfig/modconfig"
	"golang.org/x/exp/maps"
)

func (c *InteractiveClient) initialiseSuggestionsLegacy() {
	c.initialiseQuerySuggestionsLegacy()
	c.initialiseTableSuggestionsLegacy()
}

func (c *InteractiveClient) initialiseQuerySuggestionsLegacy() {
	var res []prompt.Suggest

	workspaceModName := c.initData.Workspace.Mod.Name()
	resourceFunc := func(item modconfig.HclResource) (continueWalking bool, err error) {
		continueWalking = true

		qp, ok := item.(modconfig.QueryProvider)
		if !ok {
			return
		}
		modTreeItem, ok := item.(modconfig.ModTreeItem)
		if !ok {
			return
		}
		if qp.GetQuery() == nil
    
func (c *InteractiveClient) initialiseTableSuggestionsLegacy() {

	if c.schemaMetadata == nil {
		return
	}

	// schema names
	var schemasToAdd []string
	// unqualified table names - initialise to the introspection table names
	var unqualifiedTablesToAddMap = make(map[string]struct{})
	var unqualifiedTablesToAdd []string

	// keep track of which plugins we have added unqualified tables for
	//pluginSchemaMap := map[string]bool{}

	for schemaName, schemaDetails := range c.schemaMetadata.Schemas {
		// fully qualified table names
		var qualifiedTablesToAdd []string
		isTemporarySchema := schemaName == c.schemaMetadata.TemporarySchemaName

		// add the schema into the list of schema
		if !isTemporarySchema {
			schemasToAdd = append(schemasToAdd, schemaName)
		}

		// add qualified names of all tables
		for tableName := range schemaDetails {
			if !isTemporarySchema {

				qualifiedTablesToAdd = append(qualifiedTablesToAdd, fmt.Sprintf("%s.%s", schemaName, sanitiseTableName(tableName)))

				if helpers.StringSliceContains(c.client().GetRequiredSessionSearchPath(), schemaName) {
					unqualifiedTablesToAddMap[tableName] = struct{}{}
				}
			}
		}

		sort.Strings(qualifiedTablesToAdd)
		var tableSuggestions []prompt.Suggest
		for _, t := range qualifiedTablesToAdd {
			tableSuggestions = append(tableSuggestions, prompt.Suggest{Text: t, Description: "Table", Output: sanitiseTableName(t)})
		}
		c.suggestions.tablesBySchema[schemaName] = tableSuggestions
	}

	sort.Strings(schemasToAdd)
	for _, schema := range schemasToAdd {
		// we don't need to escape schema names, since schema names are derived from connection names
		// which are validated so that we don't end up with names which need it
		c.suggestions.schemas = append(c.suggestions.schemas, prompt.Suggest{Text: schema, Description: "Schema", Output: schema})
	}

	unqualifiedTablesToAdd = maps.Keys(unqualifiedTablesToAddMap)
	sort.Strings(unqualifiedTablesToAdd)
	for _, table := range unqualifiedTablesToAdd {
		c.suggestions.unqualifiedTables = append(c.suggestions.unqualifiedTables, prompt.Suggest{Text: table, Description: "Table", Output: sanitiseTableName(table)})
	}
}