Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CmdClear = Command{"clear", shortCmdClear, "Clear the current input statement."}
CmdClear explains that this command clears the current statement.
var CmdExit = Command{"exit", shortCmdExit, "Exit awql. Same as quit."}
CmdExit explains that this command as the same result that the quit command.
var CmdHelp = Command{"help", shortCmdHelp, "Display this help."}
CmdHelp explains that this command gives help about the tool.
var CmdQuit = Command{"quit", shortCmdExit, "Quit awql command line tool."}
CmdQuit explains that this quits the prompt.
Commands list all available commands that the tool itself interprets.
Functions ¶
This section is empty.
Types ¶
type ASCIIWriter ¶ added in v1.1.0
type ASCIIWriter struct {
// contains filtered or unexported fields
}
ASCIIWriter represents a terminal tables's writer.
func (*ASCIIWriter) Error ¶ added in v1.1.0
func (w *ASCIIWriter) Error() error
Error returns any errors occurred during the job.
func (*ASCIIWriter) Flush ¶ added in v1.1.0
func (w *ASCIIWriter) Flush()
Flush writes any buffered data to the underlying writer.
func (*ASCIIWriter) Write ¶ added in v1.1.0
func (w *ASCIIWriter) Write(record []string) error
Write adds a line to the table.
func (*ASCIIWriter) WriteHead ¶ added in v1.1.0
func (w *ASCIIWriter) WriteHead(record []string) error
WriteHead writes the table header and defines column sizes.
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command represents a command.
type CommandLine ¶
type CommandLine struct {
// contains filtered or unexported fields
}
CommandLine represents a basic input.
func (*CommandLine) Scan ¶
func (e *CommandLine) Scan() (err error)
Scan starts the engine with only the query query to execute from args.
func (*CommandLine) Seek ¶
func (e *CommandLine) Seek(s string) error
Seek executes the given statement and write its records.
type CsvWriter ¶
type CsvWriter struct {
// contains filtered or unexported fields
}
CsvWriter is a writer that build a CSV string.
func (*CsvWriter) Flush ¶
func (w *CsvWriter) Flush()
Flush writes any buffered data to the underlying writer.
type PositionWriter ¶
type PositionWriter interface { Positioner Writer }
PositionWriter represents a writer using a positioner.
func NewStatsWriter ¶
func NewStatsWriter(w io.Writer, exec bool) PositionWriter
NewStatsWriter returns a writer of stream's statistics.
type Positioner ¶
type Positioner interface {
Position() int
}
Positioner is an interface used by Position.
type ScanSeeker ¶
ScanSeeker is an interface witch implements Scan and Seek.
func NewCommandLine ¶
func NewCommandLine(conf conf.Settings) ScanSeeker
NewCommandLine returns a basic input.
func NewTerminal ¶
func NewTerminal(conf conf.Settings) ScanSeeker
NewTerminal returns an instance of Terminal.
type StatsWriter ¶
type StatsWriter struct {
// contains filtered or unexported fields
}
StatsWriter represents a statistics's writer.
func (*StatsWriter) Error ¶
func (w *StatsWriter) Error() error
Error returns nil. Just implements the writer of statistics.
func (*StatsWriter) Flush ¶
func (w *StatsWriter) Flush()
Flush writes any buffered data to the underlying writer. It computes various information about the written data (duration, number, etc.).
func (*StatsWriter) Position ¶
func (w *StatsWriter) Position() int
Position returns the current size of the result set.
func (*StatsWriter) Write ¶
func (w *StatsWriter) Write(record []string) error
Write increments the number of written lines.
func (*StatsWriter) WriteHead ¶
func (w *StatsWriter) WriteHead(record []string) error
WriteHead defines the start date of the writing job.
type Terminal ¶
type Terminal struct {
CommandLine
}
Terminal represents a terminal as stdin (shell).
type VASCIIWriter ¶ added in v1.1.0
type VASCIIWriter struct {
// contains filtered or unexported fields
}
VASCIIWriter represents a terminal writer whose prints one line per column value.
func (*VASCIIWriter) Error ¶ added in v1.1.0
func (w *VASCIIWriter) Error() error
Error returns any errors occurred during the job.
func (*VASCIIWriter) Flush ¶ added in v1.1.0
func (w *VASCIIWriter) Flush()
Flush writes any buffered data to the underlying writer.
func (*VASCIIWriter) Write ¶ added in v1.1.0
func (w *VASCIIWriter) Write(record []string) error
Write prints a new line for each column value.
func (*VASCIIWriter) WriteHead ¶ added in v1.1.0
func (w *VASCIIWriter) WriteHead(record []string) error
WriteHead defines the prefix of each line. Each prefix is a column name.
type Writer ¶
type Writer interface { Error() error Flush() Write(record []string) error WriteHead(record []string) error }
Writer represents a writer.
func NewASCIIWriter ¶ added in v1.1.0
NewASCIIWriter returns a writer of term tables.
func NewVASCIIWriter ¶ added in v1.1.0
NewVASCIIWriter returns a vertical writer.