Documentation ¶
Overview ¶
Copyright © 2024 Roberto Antolin <rantolin DOT geo AT gmail DOT com>
Copyright © 2024 Roberto Antolin <rantolin DOT geo AT gmail DOT com>
Copyright © 2024 Roberto Antolin <rantolin DOT geo AT gmail DOT com>
Copyright © 2024 Roberto Antolin <rantolin DOT geo AT gmail DOT com>
Copyright © 2024 Roberto Antolin <rantolin DOT geo AT gmail DOT com>
Index ¶
Constants ¶
View Source
const (
DefaultProfileName = "default"
)
Variables ¶
View Source
var SetCmd = &cobra.Command{ Use: "set", Short: "Set the project and dataset", Long: `The 'set' command sets the project and dataset to be used by the bqsql tool. These values are stored in a configuration file and are used by other commands to determine the project and dataset to operate on. Use 'bqsql set --project_id my-project --dataset my_dataset' `, Run: func(cmd *cobra.Command, args []string) { projectID, _ := cmd.Flags().GetString("project_id") datasetID, _ := cmd.Flags().GetString("dataset") profile, _ := cmd.Flags().GetString("profile") isDefault, _ := cmd.Flags().GetBool("default") WriteConfigFile(cmd.OutOrStdout(), isDefault, profile, projectID, datasetID) }, }
setCmd represents the set command
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func QueryBasic ¶
QueryBasic demonstrates issuing a query and reading results.
Types ¶
type Config ¶ added in v0.0.2
type Config struct { Configurations map[string]Configuration `mapstructure:"configurations"` Default string `mapstructure:"default"` }
type Configuration ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.