Documentation
¶
Index ¶
- Variables
- func ClassifyError(err error) (errorType, suggestion string)
- func ContextContent() string
- func Execute()
- func GetCommandList() []commandSummary
- func GetSchema(name string) (commandSchema, bool)
- func MatchDatabaseByName(databases []client.Database, name string) (int, error)
- func MatchTableByName(tables []client.TableMetadata, name string) (int, error)
- func ParseWhereClause(clause string) (string, string, error)
- func ResolveTableID(c *client.Client, dbID int, tableFlag string) (int, error)
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
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 GetCommandList ¶ added in v0.1.2
func GetCommandList() []commandSummary
GetCommandList returns the list of command summaries. Exported for testing.
func MatchDatabaseByName ¶
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
ParseWhereClause parses a "field=value" string into field name and value. Exported for testing.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.