Add support for 'import_schema' property in connection config, controlling whether to create a postgres schema for a steampipe connection. Closes #3407

Rename 'connection_state' table to 'steampipe_connection_state'. #3403
Rename 'internal' table to 'steampipe_internal
Remove 'Connection' property from ConnectionState
This commit is contained in:
kaidaguerre
2023-05-15 13:07:36 +01:00
committed by GitHub
parent 9980427e83
commit b0b2c62338
37 changed files with 506 additions and 435 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"github.com/c-bata/go-prompt"
"github.com/turbot/go-kit/helpers"
"github.com/turbot/steampipe/pkg/constants"
"github.com/turbot/steampipe/pkg/db/db_common"
"github.com/turbot/steampipe/pkg/steampipeconfig"
"github.com/turbot/steampipe/pkg/steampipeconfig/modconfig"
@@ -45,6 +46,9 @@ func (c *InteractiveClient) initialiseSchemaAndTableSuggestions(connectionStateM
// (this is needed as GetFirstSearchPathConnectionForPlugins will return ALL dynamic connections)
var unqualifiedTablesToAdd = make(map[string]struct{})
// add connection state
unqualifiedTablesToAdd[constants.ConnectionStateTable] = struct{}{}
// get the first search path connection for each plugin
firstConnectionPerPlugin := connectionStateMap.GetFirstSearchPathConnectionForPlugins(c.client().GetRequiredSessionSearchPath())
firstConnectionPerPluginLookup := utils.SliceToLookup(firstConnectionPerPlugin)