Documentation
¶
Overview ¶
Package command provides assistant commands.
Package command provides assistant commands.
Index ¶
- Constants
- func Explain(ctx context.Context, msgSvc connection.Messenger, command *platform.Command, ...) error
- func ResetSession(ctx context.Context, cmd *platform.Command, msg *models.Message, ...) error
- func Transmit(cmd *platform.Command, msg *models.Message, msgSvc connection.Messenger, ...) error
- type ActivityCmd
- type ExecCmd
- type HypoCmd
- type PlanCmd
- type TerminateCmd
Constants ¶
const ActivityCaption = "*Activity response:*\n"
ActivityCaption contains caption for rendered tables.
const CutText = "_(The text in the preview above has been cut)_"
const HypoPGCaption = "*HypoPG response:*\n"
HypoPGCaption contains caption for rendered tables.
const (
// MsgExplainOptionReq describes an explain error.
MsgExplainOptionReq = "Use `explain` to see the query's plan, e.g. `explain select 1`"
)
const MsgPlanOptionReq = "Use `plan` to see the query's plan without execution, e.g. `plan select 1`"
MsgPlanOptionReq describes an explain without execution error.
const PlanSize = 400
const SeparatorPlan = "\n[...SKIP...]\n"
const TerminateCaption = "*Terminate response:*\n"
TerminateCaption contains caption for rendered tables.
Variables ¶
This section is empty.
Functions ¶
func Explain ¶
func Explain(ctx context.Context, msgSvc connection.Messenger, command *platform.Command, msg *models.Message, session usermanager.UserSession) error
Explain runs an explain query.
func ResetSession ¶
func ResetSession(ctx context.Context, cmd *platform.Command, msg *models.Message, dbLab *dblabapi.Client, msgSvc connection.Messenger, session *usermanager.UserSession, appVersion, edition string) error
ResetSession provides a command to reset a Database Lab session.
Types ¶
type ActivityCmd ¶
type ActivityCmd struct {
// contains filtered or unexported fields
}
ActivityCmd defines the activity command.
func NewActivityCmd ¶
func NewActivityCmd(cmd *platform.Command, msg *models.Message, db *pgxpool.Pool, messengerSvc connection.Messenger) *ActivityCmd
NewActivityCmd return a new exec command.
func (*ActivityCmd) Execute ¶
func (c *ActivityCmd) Execute() error
Execute runs the activity command.
type ExecCmd ¶
type ExecCmd struct {
// contains filtered or unexported fields
}
ExecCmd defines the exec command.
func NewExec ¶
func NewExec(command *platform.Command, msg *models.Message, session usermanager.UserSession, messengerSvc connection.Messenger) *ExecCmd
NewExec return a new exec command.
type HypoCmd ¶
type HypoCmd struct {
// contains filtered or unexported fields
}
HypoCmd defines a hypo command.
type PlanCmd ¶
type PlanCmd struct {
// contains filtered or unexported fields
}
PlanCmd defines the plan command.
type TerminateCmd ¶
type TerminateCmd struct {
// contains filtered or unexported fields
}
TerminateCmd defines the terminate command.
func NewTerminateCmd ¶
func NewTerminateCmd(cmd *platform.Command, msg *models.Message, db *pgxpool.Pool, messengerSvc connection.Messenger) *TerminateCmd
NewTerminateCmd return a new terminate command.
func (*TerminateCmd) Execute ¶
func (c *TerminateCmd) Execute() error
Execute runs the terminate command.