sqlcmd

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(version string)

Types

type SQLCmdArguments

type SQLCmdArguments struct {
	// Which batch terminator to use. Default is GO
	BatchTerminator string `short:"c" default:"GO" arghelp:"Specifies the batch terminator. The default value is GO."`
	// Whether to trust the server certificate on an encrypted connection
	TrustServerCertificate bool   `short:"C" help:"Implicitly trust the server certificate without validation."`
	DatabaseName           string `` /* 259-byte string literal not displayed */
	UseTrustedConnection   bool   `` /* 197-byte string literal not displayed */
	UserName               string `` /* 147-byte string literal not displayed */
	// Files from which to read query text
	InputFile  []string `` /* 210-byte string literal not displayed */
	OutputFile string   `short:"o" type:"path" help:"Identifies the file that receives output from sqlcmd."`
	// First query to run in interactive mode
	InitialQuery string `` /* 182-byte string literal not displayed */
	// Query to run then exit
	Query  string `` /* 154-byte string literal not displayed */
	Server string `` /* 162-byte string literal not displayed */
	// Disable syscommands with a warning
	DisableCmdAndWarn bool `short:"X" xor:"syscmd" help:"Disables commands that might compromise system security. Sqlcmd issues a warning and continues."`
	// AuthenticationMethod is new for go-sqlcmd
	AuthenticationMethod        string            `` /* 281-byte string literal not displayed */
	UseAad                      bool              `` /* 269-byte string literal not displayed */
	DisableVariableSubstitution bool              `` /* 231-byte string literal not displayed */
	Variables                   map[string]string `` /* 301-byte string literal not displayed */
	PacketSize                  int               `` /* 436-byte string literal not displayed */
	LoginTimeout                int               `` /* 265-byte string literal not displayed */
	WorkstationName             string            `` /* 364-byte string literal not displayed */
	ApplicationIntent           string            `` /* 306-byte string literal not displayed */
	EncryptConnection           string            `` /* 138-byte string literal not displayed */
	DriverLoggingLevel          int               `help:"Level of mssql driver messages to print."`
	ExitOnError                 bool              `short:"b" help:"Specifies that sqlcmd exits and returns a DOS ERRORLEVEL value when an error occurs."`
	ErrorSeverityLevel          uint8             `short:"V" help:"Controls the severity level that is used to set the ERRORLEVEL variable on exit."`
	ErrorLevel                  int               `` /* 146-byte string literal not displayed */
	Format                      string            `short:"F" help:"Specifies the formatting for results." default:"horiz" enum:"horiz,horizontal,vert,vertical"`
	ErrorsToStderr              int               `` /* 244-byte string literal not displayed */
	Headers                     int               `` /* 132-byte string literal not displayed */
	UnicodeOutputFile           bool              `short:"u" help:"Specifies that all output files are encoded with little-endian Unicode"`
	Version                     bool              `help:"Show the sqlcmd version information"`
	ColumnSeparator             string            `short:"s" help:"Specifies the column separator character. Sets the SQLCMDCOLSEP variable."`
	ScreenWidth                 *int              `short:"w" help:"Specifies the screen width for output. Sets the SQLCMDCOLWIDTH variable."`
	TrimSpaces                  bool              `short:"W" help:"Remove trailing spaces from a column."`
	MultiSubnetFailover         bool              `` /* 136-byte string literal not displayed */
	Password                    string            `` /* 141-byte string literal not displayed */
	// Keep Help at the end of the list
	Help bool `short:"?" help:"Show syntax summary."`
}

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() error

Validate accounts for settings not described by Kong attributes

Jump to

Keyboard shortcuts

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