sqlcmd

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(version string)

func SetScreenWidthFlags added in v1.2.0

func SetScreenWidthFlags(args *SQLCmdArguments, rootCmd *cobra.Command)

Types

type SQLCmdArguments

type SQLCmdArguments struct {
	// Which batch terminator to use. Default is GO
	BatchTerminator string
	// Whether to trust the server certificate on an encrypted connection
	TrustServerCertificate bool
	DatabaseName           string
	UseTrustedConnection   bool
	UserName               string
	// Files from which to read query text
	InputFile  []string
	OutputFile string
	// First query to run in interactive mode
	InitialQuery string
	// Query to run then exit
	Query  string
	Server string
	// Disable syscommands with a warning or error
	DisableCmd *int
	// AuthenticationMethod is new for go-sqlcmd
	AuthenticationMethod        string
	UseAad                      bool
	DisableVariableSubstitution bool
	Variables                   map[string]string
	PacketSize                  int
	LoginTimeout                int
	WorkstationName             string
	ApplicationIntent           string
	EncryptConnection           string
	DriverLoggingLevel          int
	ExitOnError                 bool
	ErrorSeverityLevel          uint8
	ErrorLevel                  int
	Format                      string
	ErrorsToStderr              *int
	Headers                     int
	UnicodeOutputFile           bool
	Version                     bool
	ColumnSeparator             string
	ScreenWidth                 *int
	VariableTypeWidth           *int
	FixedTypeWidth              *int
	TrimSpaces                  bool
	Password                    string
	DedicatedAdminConnection    bool
	ListServers                 string
	RemoveControlCharacters     *int
	EchoInput                   bool
	QueryTimeout                int
	EnableColumnEncryption      bool
	ChangePassword              string
	ChangePasswordAndExit       string
	// Keep Help at the end of the list
	Help bool
}

SQLCmdArguments defines the command line arguments for sqlcmd The exhaustive list is at https://docs.microsoft.com/sql/tools/sqlcmd-utility?view=sql-server-ver15

func (*SQLCmdArguments) Validate

func (a *SQLCmdArguments) Validate(c *cobra.Command) (err error)

Validate arguments for settings not describe

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL