diff --git a/cli/sqlc.go b/cli/sqlc.go index 97d6521..a253006 100644 --- a/cli/sqlc.go +++ b/cli/sqlc.go @@ -502,16 +502,12 @@ func main() { prompt = "\\u@\\H:\\p/\\d > " refreshDB := false - if parameter.Database != "" { - refreshDB = true - } Loop: for { out.Flush() if refreshDB { db.Database, _ = db.GetDatabase() - go func() { dynamic_tokens = db.GetAutocompleteTokens() }() // Update the dynamic tokens in the background... } renderdPrompt := prompt diff --git a/connection.go b/connection.go index 6e64e2d..1592941 100644 --- a/connection.go +++ b/connection.go @@ -463,11 +463,17 @@ func connectionCommands(config SQCloudConfig) (string, []interface{}) { buffer += noblobCommand(config.NoBlob) } - buffer += maxdataCommand(config.MaxData) + if config.MaxData > 0 { + buffer += maxdataCommand(config.MaxData) + } - buffer += maxrowsCommand(config.MaxRows) + if config.MaxRows > 0 { + buffer += maxrowsCommand(config.MaxRows) + } - buffer += maxrowsetCommand(config.MaxRowset) + if config.MaxRowset > 0 { + buffer += maxrowsetCommand(config.MaxRowset) + } return buffer, args }