Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AfterPromptCloseAction ¶
type AfterPromptCloseAction int
const ( AfterPromptCloseExit AfterPromptCloseAction = iota AfterPromptCloseRestart )
type Highlighter ¶
type Highlighter struct {
// contains filtered or unexported fields
}
func (*Highlighter) Highlight ¶
func (h *Highlighter) Highlight(d prompt.Document) ([]byte, error)
type InteractiveClient ¶
type InteractiveClient struct {
// contains filtered or unexported fields
}
InteractiveClient is a wrapper a Prompt to facilitate interactive query prompt
func (*InteractiveClient) ClosePrompt ¶
func (c *InteractiveClient) ClosePrompt(afterClose AfterPromptCloseAction)
ClosePrompt cancels the running prompt, setting the action to take after close
func (*InteractiveClient) InteractivePrompt ¶
func (c *InteractiveClient) InteractivePrompt(parentContext context.Context)
InteractivePrompt starts an interactive prompt and return
type QueryHistory ¶
type QueryHistory struct {
// contains filtered or unexported fields
}
QueryHistory :: struct for working with history in the interactive mode
func (*QueryHistory) Peek ¶
func (q *QueryHistory) Peek() *string
Peek returns the last element of the history stack. returns nil if there is no history
func (*QueryHistory) Persist ¶
func (q *QueryHistory) Persist() error
Persist writes the history to the filesystem
func (*QueryHistory) Push ¶
func (q *QueryHistory) Push(query string)
Push adds a string to the history queue trimming to maxHistorySize if necessary
type ResolvedQuery ¶
ResolvedQuery contains the execute SQL and flag indicating if the query is a meta query
Click to show internal directories.
Click to hide internal directories.