cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsTTY = func() bool {
	fi, err := os.Stdout.Stat()
	if err != nil {
		return false
	}
	return fi.Mode()&os.ModeCharDevice != 0
}

IsTTY reports whether stdout is a terminal. It is a package-level variable for testability.

Functions

func ClassifyError added in v0.1.2

func ClassifyError(err error) (errorType, suggestion string)

ClassifyError determines the error type and suggestion for structured error output. Exported for testing.

func ContextContent added in v0.1.2

func ContextContent() string

ContextContent returns the embedded agent context document. Exported for testing.

func Execute

func Execute()

func GetCommandList added in v0.1.2

func GetCommandList() []commandSummary

GetCommandList returns the list of command summaries. Exported for testing.

func GetSchema added in v0.1.2

func GetSchema(name string) (commandSchema, bool)

GetSchema returns the schema for a command. Exported for testing.

func MatchDatabaseByName

func MatchDatabaseByName(databases []client.Database, name string) (int, error)

MatchDatabaseByName finds a database by case-insensitive substring match. Exported for testing.

func MatchTableByName added in v0.1.2

func MatchTableByName(tables []client.TableMetadata, name string) (int, error)

MatchTableByName finds a table by case-insensitive substring match. Exported for testing.

func ParseWhereClause added in v0.1.2

func ParseWhereClause(clause string) (string, string, error)

ParseWhereClause parses a "field=value" string into field name and value. Exported for testing.

func ResolveTableID added in v0.1.2

func ResolveTableID(c *client.Client, dbID int, tableFlag string) (int, error)

ResolveTableID is exported for testing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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