Documentation
¶
Index ¶
- Variables
- func SetAvailableDrivers(m map[string]string)
- type Error
- type Handler
- func (h *Handler) Close() error
- func (h *Handler) DisplayHelp(w io.Writer)
- func (h *Handler) Execute(w io.Writer, sqlstr string, auto, forceExec bool) error
- func (h *Handler) ForceInteractive(interactive bool)
- func (h *Handler) HistoryFile() string
- func (h *Handler) IncludeFile(path string, relative bool) error
- func (h *Handler) LaunchEditor(path, line, stmt string) ([]rune, error)
- func (h *Handler) Open(urlstr string) error
- func (h *Handler) Process(stdin io.Reader, stdout, stderr io.Writer) error
- func (h *Handler) Query(w io.Writer, sqlstr string) error
- func (h *Handler) Reset()
- func (h *Handler) RunCommands(cmds []string) error
- func (h *Handler) RunReadline(in, out string) error
- func (h *Handler) SetPrompt(l *readline.Instance)
- func (h *Handler) WrapError(err error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDriverNotAvailable is the driver not available error. ErrDriverNotAvailable = errors.New("driver not available") // 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") // ErrNoEditorDefined is the no editor defined error. ErrNoEditorDefined = errors.New("no editor defined") )
Functions ¶
func SetAvailableDrivers ¶
SetAvailableDrivers sets the known available drivers.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a input process handler.
func (*Handler) DisplayHelp ¶
DisplayHelp displays the help message.
func (*Handler) ForceInteractive ¶
ForceInteractive forces the interactive mode.
func (*Handler) HistoryFile ¶
HistoryFile returns the history file name for the handler.
func (*Handler) IncludeFile ¶
IncludeFile includes the specified path.
func (*Handler) LaunchEditor ¶
LaunchEditor launches an editor using the current query buffer.
func (*Handler) Process ¶
Process reads line commands from stdin, writing output to stdout and stderr.
func (*Handler) RunCommands ¶
RunCommands processes command line arguments.
func (*Handler) RunReadline ¶
RunReadline processes input.
Click to show internal directories.
Click to hide internal directories.