text

package
v0.21.6 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 7 Imported by: 7 modules, 14 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package text contains the text (and eventually translations) for the usql application.

Index

Constants

View Source
const License = `` /* 1083-byte string literal not displayed */

License contains the license text for usql.

Variables

View Source
var (
	// ErrNotConnected is the not connected error.
	ErrNotConnected = errors.New("not connected")
	// ErrNoSuchFileOrDirectory is the no such file or directory error.
	ErrNoSuchFileOrDirectory = errors.New("no such file or directory")
	// ErrCannotIncludeDirectories is the cannot include directories error.
	ErrCannotIncludeDirectories = errors.New("cannot include directories")
	// ErrMissingDSN is the missing dsn error.
	ErrMissingDSN = errors.New("missing dsn")
	// ErrNoPreviousTransactionExists is the no previous transaction exists error.
	ErrNoPreviousTransactionExists = errors.New("no previous transaction exists")
	// ErrPreviousTransactionExists is the previous transaction exists error.
	ErrPreviousTransactionExists = errors.New("previous transaction exists")
	// ErrPasswordAttemptsExhausted is the exhausted password attempts error.
	ErrPasswordAttemptsExhausted = errors.New("password attempts exhausted")
	// ErrSingleTransactionCannotBeUsedWithInteractiveMode is the single transaction cannot be used with interactive mode error.
	ErrSingleTransactionCannotBeUsedWithInteractiveMode = errors.New("--single-transaction cannot be used with interactive mode")
	// ErrNoEditorDefined is the no editor defined error.
	ErrNoEditorDefined = errors.New("no editor defined")
	// ErrUnknownCommand is the unknown command error.
	ErrUnknownCommand = errors.New("unknown command")
	// ErrMissingRequiredArgument is the missing required argument error.
	ErrMissingRequiredArgument = errors.New("missing required argument")
	// ErrDriverNotAvailable is the driver not available error.
	ErrDriverNotAvailable = errors.New("driver not available")
	// ErrPasswordNotSupportedByDriver is the password not supported by driver error.
	ErrPasswordNotSupportedByDriver = errors.New(`\password not supported by driver`)
	// ErrUnterminatedQuotedString is the unterminated quoted string error.
	ErrUnterminatedQuotedString = errors.New("unterminated quoted string")
	// ErrNoShellAvailable is the no SHELL available error.
	ErrNoShellAvailable = errors.New("no SHELL available")
	// ErrNotInteractive is the not interactive error.
	ErrNotInteractive = errors.New("not interactive")
	// ErrInvalidType is the invalid type error.
	ErrInvalidType = errors.New("invalid -TYPE: TYPE must be password, string, int, uint, float, or bool")
	// ErrInvalidIdentifier is the invalid identifier error.
	ErrInvalidIdentifier = errors.New("invalid identifier")
	// ErrInvalidValue is the invalid value error.
	ErrInvalidValue = errors.New("invalid value")
	// ErrTooManyRows is the too many rows error.
	ErrTooManyRows = errors.New("too many rows")
	// ErrInvalidFormatType is the invalid format type error.
	ErrInvalidFormatType = errors.New(`\pset: allowed formats are unaligned, aligned, wrapped, html, asciidoc, latex, latex-longtable, troff-ms, json, csv`)
	// ErrInvalidFormatPagerType is the invalid format pager error.
	ErrInvalidFormatPagerType = errors.New(`\pset: allowed pager values are on, off, always`)
	// ErrInvalidFormatExpandedType is the invalid format expanded error.
	ErrInvalidFormatExpandedType = errors.New(`\pset: allowed expanded values are on, off, auto`)
	// ErrInvalidFormatLineStyle is the invalid format line style error.
	ErrInvalidFormatLineStyle = errors.New(`\pset: allowed line styles are ascii, old-ascii, unicode`)
	// ErrInvalidFormatBorderLineStyle is the invalid format border line style error.
	ErrInvalidFormatBorderLineStyle = errors.New(`\pset: allowed Unicode border line styles are single, double`)
	// ErrInvalidTimezoneLocation is the invalid timezone location error.
	ErrInvalidTimezoneLocation = errors.New(`\pset: invalid timezone location`)
	// ErrGraphicsNotSupported is the graphics not supported error.
	ErrGraphicsNotSupported = errors.New(`\chart: graphics not supported in terminal`)
	// ErrNoNumericColumns is the no numeric columns error.
	ErrNoNumericColumns = errors.New(`\chart: no numeric columns found`)
	// ErrInvalidQuotedString is the invalid quoted string error.
	ErrInvalidQuotedString = errors.New(`invalid quoted string`)
	// ErrInvalidFormatOption is the invalid format option error.
	ErrInvalidFormatOption = errors.New("invalid format option")
	// ErrInvalidWatchDuration is the invalid watch duration error.
	ErrInvalidWatchDuration = errors.New("invalid watch duration")
	// ErrUnableToNormalizeURL is the unable to normalize URL error.
	ErrUnableToNormalizeURL = errors.New("unable to normalize URL")
	// ErrInvalidIsolationLevel is the invalid isolation level error.
	ErrInvalidIsolationLevel = errors.New("invalid isolation level")
	// ErrNotSupported is the not supported error.
	ErrNotSupported = errors.New("not supported")
	// ErrWrongNumberOfArguments is the wrong number of arguments error.
	ErrWrongNumberOfArguments = errors.New("wrong number of arguments")
	// ErrUnknownFileType is the unknown file type error.
	ErrUnknownFileType = errors.New("unknown file type")
	// ErrNamedConnectionIsNotAURL is the named connection is not a url error.
	ErrNamedConnectionIsNotAURL = errors.New("named connection is not a url")
	// ErrInvalidConfig is the invalid config error.
	ErrInvalidConfig = errors.New("invalid config")
)
View Source
var (
	CommandName           = `usql`
	CommandVersion        = `0.0.0-dev`
	PassfileName          = CommandName + `pass`
	ConfigName            = "config"
	CommandHelpHint       = `hint: try "` + CommandName + ` --help" for more information.`
	NotConnected          = `(not connected)`
	HelpPrefix            = `help`
	QuitPrefix            = `quit`
	ExitPrefix            = `exit`
	WelcomeDesc           = `Type "` + HelpPrefix + `" for help.`
	QueryBufferEmpty      = `Query buffer is empty.`
	QueryBufferReset      = `Query buffer reset (cleared).`
	InvalidCommand        = `Invalid command \%s. Try \? for help.`
	ExtraArgumentIgnored  = `\%s: extra argument %q ignored`
	MissingRequiredArg    = `\%s: missing required argument`
	Copyright             = CommandName + ", " + Banner + ".\n\n" + License
	RowCount              = `(%d rows)`
	AvailableDrivers      = `Available Drivers:`
	ConnInfo              = `Connected with driver %s (%s)`
	EnterPassword         = `Enter password: `
	EnterPreviousPassword = `Enter previous password: `
	PasswordsDoNotMatch   = `Passwords do not match, trying again ...`
	NewPassword           = `Enter new password: `
	ConfirmPassword       = `Confirm password: `
	PasswordChangeFailed  = `\password for %q failed: %v`
	CouldNotSetVariable   = `could not set variable %q`
	ChartParseFailed      = `\chart: invalid argument for %q: %v`
	// PasswordChangeSucceeded = `\password succeeded for %q`
	HelpDesc          string
	HelpDescShort     = `Use \? for help or press control-C to clear the input buffer.`
	HelpBanner        = `You are using ` + CommandName + ", " + Banner + `.`
	HelpCommandPrefix = `Type:  `
	HelpCommands      = [][]string{
		{`copyright`, `for distribution terms`},

		{`?`, `for help with ` + CommandName + ` commands`},
		{`g`, `or terminate with semicolon to execute query`},
		{`q`, `to quit`},
	}
	QuitDesc                = `Use \q to quit.`
	UnknownFormatFieldName  = `unknown option: %s`
	FormatFieldInvalid      = `unrecognized value %q for "%s"`
	FormatFieldInvalidValue = `unrecognized value %q for "%s": %s expected`
	FormatFieldNameSetMap   = map[string]string{
		`border`:                   `Border style is %d.`,
		`columns`:                  `Target width is %d.`,
		`expanded`:                 `Expanded display is %s.`,
		`expanded_auto`:            `Expanded display is used automatically.`,
		`fieldsep`:                 `Field separator is %q.`,
		`fieldsep_zero`:            `Field separator is zero byte.`,
		`footer`:                   `Default footer is %s.`,
		`format`:                   `Output format is %s.`,
		`linestyle`:                `Line style is %s.`,
		`locale`:                   `Locale is %q.`,
		`null`:                     `Null display is %q.`,
		`numericlocale`:            `Locale-adjusted numeric output is %s.`,
		`pager`:                    `Pager usage is %s.`,
		`pager_min_lines`:          `Pager won't be used for less than %d line(s).`,
		`recordsep`:                `Field separator is %q.`,
		`recordsep_zero`:           `Record separator is zero byte.`,
		`tableattr`:                `Table attributes are %q.`,
		`time`:                     `Time display is %s.`,
		`title`:                    `Title is %q.`,
		`tuples_only`:              `Tuples only is %s.`,
		`unicode_border_linestyle`: `Unicode border line style is %q.`,
		`unicode_column_linestyle`: `Unicode column line style is %q.`,
		`unicode_header_linestyle`: `Unicode header line style is %q.`,
	}
	FormatFieldNameUnsetMap = map[string]string{
		`tableattr`: `Table attributes unset.`,
		`title`:     `Title is unset.`,
	}
	TimingSet                 = `Timing is %s.`
	TimingDesc                = `Time: %0.3f ms`
	InvalidValue              = `invalid -%s value %q: %s`
	NotSupportedByDriver      = `%s not supported by %s driver`
	RelationNotFound          = `Did not find any relation named "%s".`
	InvalidOption             = `invalid option %q`
	NotificationReceived      = `Asynchronous notification %q %sreceived from server process with PID %d.`
	NotificationPayload       = `with payload %q `
	UnknownShortAlias         = `(unk)`
	InvalidNamedConnection    = `warning: named connection %q was not defined: %v`
	ChartsPathDoesNotExist    = `warning: charts_path %q does not exist`
	ChartsPathIsNotADirectory = `warning: charts_path %q is not a directory`
	UsageTemplate             = `` /* 135-byte string literal not displayed */

	ChartUsage = `` /* 379-byte string literal not displayed */

)

Various usql text bits.

View Source
var Command = func() string {
	return spaceRE.ReplaceAllString(CommandName, "")
}

Command returns the command name without spaces.

View Source
var CommandLower = func() string {
	return strings.ToLower(Command())
}

CommandLower returns the lower case command name without spaces.

View Source
var CommandUpper = func() string {
	return strings.ToUpper(Command())
}

CommandUpper returns the upper case command name without spaces.

Logo is the logo.

View Source
var LogoPng []byte

LogoPng is the embedded logo.

View Source
var Short = func() string {
	return Command() + ", " + Banner
}

Short returns the command name and banner.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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